How to resolve `node:crypto` error during Sveltekit deploy
I've tried creating a
wrangler.toml
file with the node compat config but it doesn't change the outcome.3 Replies
bump
is this a local build or in CI? is node available where you're building? It should work, i have the same stack and im using node:crypto
Solution: Add the
node_compat
flag from within Cloudflares dashboard panel, see screenshot for reference or follow the link: https://developers.cloudflare.com/workers/runtime-apis/nodejs/Cloudflare Docs
Node.js compatibility · Cloudflare Workers docs
Implemented Node.js runtime APIs and enablement instructions for your Worker project.
![No description](https://cdn.answeroverflow.com/1226490479768502283/Screenshot_2024-04-07-07-12-56-14_df198e732186825c8df26e3c5a10d7cd.jpg)