cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 592 forks source link

🐛 BUG: Uncaught ReferenceError: global is not defined #6084

Open dangvanthanh opened 1 week ago

dangvanthanh commented 1 week ago

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

Screenshot 2024-06-19 at 3 06 36 PM

Screenshot 2024-06-19 at 2 57 52 PM

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

agotfredsen82 commented 6 days ago

have this aswell . prevents fetch from working any workaround for this ??

Saganic commented 1 day ago

+1 seeing this upstream in a nuxthub project