Cloudflare fail to publish
Hello
Im getting an error when deploying to github, but after googling and trying to find the error in my project im stumped. Has anyone else ran into this and fixed it?
It runs fine on both Nuxt dev and build/preview
Error below and buildlog attached
Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global is not defined
at chunks/runtime.mjs:1:30871
5 Replies
Deleted node_modules and pnpm-lock.yaml and installed via npm, and the deployment worked, but if i switch back to pnpm it fails again. Updated to pnpm 9.0.6 to see if that was the cause, but no change
Giving bun a try now
Bun also worked, so it seemes to be a pnpm specific bug
Hey @isakwang, I'm also using pnpm, can you confirm that it was the blocking point for your cloudflare page deployment please ?
I'm in the same situation
Yes. Didn’t have the time to figure out what was happening
So you basically as you mentionned deleted node_modules and pnpm-lock.yaml then you did you "npm install" and you repushed your deployment on Pages ?
yes