Crypto module not found in edge environment.
Answered
Ocicat posted this in #help-forum
OcicatOP
It says here: https://vercel.com/docs/functions/runtimes/edge-runtime
It should be supported.
I am using Nextjs 14.2 managed with pnpm8 and it's throwing that error.
It should be supported.
I am using Nextjs 14.2 managed with pnpm8 and it's throwing that error.
Answered by Ray
yes webcrypto is supported but not node-crypto
what is the error message you got?
what is the error message you got?
4 Replies
@Ocicat It says here: https://vercel.com/docs/functions/runtimes/edge-runtime
It should be supported.
I am using Nextjs 14.2 managed with pnpm8 and it's throwing that error.
yes webcrypto is supported but not node-crypto
what is the error message you got?
what is the error message you got?
Answer
@Ray yes webcrypto is supported but not node-crypto
what is the error message you got?
OcicatOP
Module not found. Thought it was some issue from my environment or tooling, but I get it now. I expected more node-crypto rather than the browser. It's confusing why the browser api is supported
@Ocicat Module not found. Thought it was some issue from my environment or tooling, but I get it now. I expected more node-crypto rather than the browser. It's confusing why the browser api is supported
because the edge runtime is build on top of [web-api](https://developer.mozilla.org/en-US/docs/Web/API)