You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should not be using the nodejs_compat flag in wrangler. Using this flag makes your code's bundle process import the Node.js bundle that depends on node:crypto and other Node.js builtins. Given that these builtins are incomplete1 in Cloudflare workers you will be met with errors.
Tip
If you don't use the nodejs_compat flag in Cloudflare Workers, then you're all set and good.
Cloudflare Workers (workerd) make use of Web Cryptography API for the cryptographic operations.
Warning
You should not be using the
nodejs_compat
flag in wrangler. Using this flag makes your code's bundle process import the Node.js bundle that depends onnode:crypto
and other Node.js builtins. Given that these builtins are incomplete1 in Cloudflare workers you will be met with errors.Tip
If you don't use the
nodejs_compat
flag in Cloudflare Workers, then you're all set and good.Cloudflare Workers (workerd) make use of Web Cryptography API for the cryptographic operations.
JSON Web Key Type Support
kty
valueJWS Algorithm Support
alg
valuesJWE Key Management Algorithm Support
alg
valuesJWE Content Encryption Algorithm Support
enc
valuesUnsupported Algorithms or Key Types
Due to the Web Cryptography API and runtime limitations the following is not supported in Clouflare Workers:
See also
Footnotes
https://developers.cloudflare.com/workers/runtime-apis/nodejs/crypto/ ↩
The text was updated successfully, but these errors were encountered: