-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Uncaught ReferenceError: global is not defined #6084
Comments
have this aswell . prevents fetch from working any workaround for this ?? |
+1 seeing this upstream in a nuxthub project |
The issue at hand here is that
A big word of warning around using My recommendation is to try and use the first option if possible, and let us know if that helped! |
Thanks so much @CarmenPopoviciu I try 2 solutions but I can't deployment on Cloudflare now. I see when I use with some package such as argon2...I can't deployment, too. Now I try check these packages I use, it take a long time. It's maybe error when I use some packages. Because I was deployed successfully before. |
@dangvanthanh any chance you have a reproduction at hand we could look at? |
I created repository for this issue: https://github.com/dangvanthanh/nuxt-to-pages $ cd apps/web
$ bun run deploy The issue when deploy: |
For me, this issue is resolved when I add |
|
Thanks. But not working for me, too. |
Now, it's working for me. Even without adding |
fantastic! In case you run into similar Nodejs compat issues, have a look at https://blog.cloudflare.com/more-npm-packages-on-cloudflare-workers-combining-polyfills-and-native-code/ which was just published. There are more details in there about the Closing this issue as it looks like all works as expected now |
Which Cloudflare product(s) does this pertain to?
Pages
What version(s) of the tool(s) are you using?
Wrangler
What version of Node are you using?
22.3.0
What operating system and version are you using?
Mac Sonoma 14.5
Describe the Bug
Observed behavior
When run
npx wrangler pages deploy dist
. It's deployment failed.Expected behavior
Deployment success.
Steps to reproduce
I running build and deploy using Nuxt 3.12.2. It's build sucessfully but can not deployment to cloudflare.
pnpm run build && wrangler pages deploy
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: