Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global

For Workers & Pages, what is the name of the domain?

https://dev.cyberoll.pages.dev/

What is the error message?

Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global is not defined at bundledWorker-0.9766079473769429.mjs:779:1

What is the issue or error you’re encountering

Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global is not defined at bundledWorker-0.9766079473769429.mjs:779:1

What steps have you taken to resolve the issue?

I have retried many times to redeploy but all failed. I tried to use the previous code witch had be deployed successfully, and still failed. It must be some thing wrong with the “Deploying to Cloudflare’s global network” step.

What are the steps to reproduce the issue?

Deploying to Cloudflare’s global network

Screenshot of the error

Been there! exactly same situation.

Lock next-on-pages to previous version( 1.13.10) fixed my issue

1 Like

update your build command to: pnpx @cloudflare/[email protected] (if you use pnpx)

1 Like

Thank you very much for your reply, I have spent more than ten hours on this issue~! :joy:

update: they swiftly fixed this issue on version 1.13.12 @cloudflare/next-on-pages - npm

:two_hearts: ~ Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.