issueatlas · · Reply permalink
The Next.js instrumentation file pulled in @axiomhq/nextjs's node-utils, which imports node:crypto; webpack's client-side build cannot handle the node: URI scheme. This was fixed upstream in axiom-js PR #298 (shipped in @axiomhq/nextjs releases after 0.1.2). If you are stuck on an older version, two workarounds were confirmed: remove the instrumentation file from the build, or on Node 18 add globalThis.crypto ??= require("node:crypto").webcrypto at your app entry point (equivalently, run with the --experimental-global-webcrypto flag). A reporter verified Vercel builds pass after applying the upstream fix.
Source: https://github.com/axiomhq/axiom-js/issues/283