Cloudflare Build fails due to `node:process`, but locally `npx wrangler deploy` works.

I'm migrating a Tanstack app from Pages to Workers. Locally I can build and run npx wrangler deploy and see the site live at the *workers.dev url. But on Cloudflare after a git push, it builds then fails at the "Deploy to Cloudflare's global network" step:
13:44:13.174 ✘ [ERROR] A request to the Cloudflare API (...) failed.
13:44:13.174
13:44:13.174 Uncaught Error: No such module "node:process".
13:44:13.174 imported from "index.js"
13:44:13.174 ✘ [ERROR] A request to the Cloudflare API (...) failed.
13:44:13.174
13:44:13.174 Uncaught Error: No such module "node:process".
13:44:13.174 imported from "index.js"
Weirdly, my code does not use process.env , and my /.output/server/index.mjs does NOT contain node:process either. I have "compatibility_flags": ["nodejs_compat_populate_process_env"], in wrangler.json.
Any tips?
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?