5dee445ef9
I was notified that this link is broken. Not sure if I'm missing something, but the Markdown doesn't look right, changed it to be a normal link. ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
1.1 KiB
1.1 KiB
Using Node.js Modules in Edge Runtime
Why This Error Occurred
The code in your Middleware or your Edge API Routes is using a feature from Node.js runtime.
However, the Edge Runtime does not support Node.js APIs and globals.
Possible Ways to Fix It
When running Next.js locally with next dev
, your application will show in the console, and in your browser, which file is importing and using an unsupported module. This module must be avoided: either by not importing it, or by replacing it with a polyfill.
For example, you might replace the Node.js crypto
module with the Web Crypto API.