Deploy failed due crypto and buffer

Hello, greetings. Please I need a little help, I just deployed a Sveltekit app to CF pages. I decided to use, node: crypto and node:buffer as the docs says they're supported. I also added a wrangler.json file with node-compact flag. On dev everything's 👍, but when I push to production, the, the site built but failed to deploy to CF global network, says "Failed to publish your function. no such module, node:crypto" At this point, I don't know what to do now. I'll appreciate any help
2 Replies
flashblaze
flashblaze5d ago
that's weird. possible to share the code in question?
Alec
Alec4d ago
I was actually running into this myself a few weeks ago (even with nodejs_compat_v2). I just ended up switching to a polyfill after a few hours of trying to debug. I was also using SvelteKit so maybe thats a common factor

Did you find this page helpful?