3 ms·
What breaks when you ship Next.js on Cloudflare Workers
- kentonv 5mo ago> bcryptjs reaches for crypto.randomBytes and a few other Node primitives that aren't polyfilled in Workers. crypto.randomBytes is definitely in Workers' node compat layer. Is it possible you didn't enabled the node_compat flag? https://developers.cloudflare.com/workers/runtime-apis/nodejs/ https://developers.cloudflare.com/workers/runtime-apis/nodej... I guess maybe it's time we turned this on by default...
- qemuguest 5mo agoYou're right — corrected: https://finterm.xyz/blog/nextjs-on-cloudflare-workers https://finterm.xyz/blog/nextjs-on-cloudflare-workers. Argon2id was my choice eventually for OWASP reasons On-by-default nodejs_compat would be welcome - Thanks!