-
Notifications
You must be signed in to change notification settings - Fork 270
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
Uncaught ReferenceError: global is not defined #2081
Comments
Given the stack, it seems you're running the preview command instead of dev? Try running the dev or preview commands with the -- Also, for upgrading we recommend the command |
Thanks a lot @frandiox for taking a look! Yes, sorry I'd mixed up the preview and dev commands, I get the error is the same for both though. With the
About the |
I mean the CLI command, This command ensures you get valid versions of each package when updating.
I don't think this has to do anything with You could try polyfilling it with something like That said, I see in your repo that you are bumping Hydrogen and Remix many versions without changing the app code. A lot of things have been updated that need changes in-app. You can see this in the changelogs of each package or, if you use |
What is the location of your example repository?
https://github.com/Nosto/shopify-hydrogen-demo, branch:
ads-4544-upgrade-major-version-demo-2
Which package or tool is having this issue?
Oxygen
What version of that package or tool are you using?
@shopify/hydrogen: 2024.4.1, @shopify/remix-oxygen: 2.0.4, @shopify/mini-oxygen: 3.0.1
What version of Remix are you using?
2.9.1
Steps to Reproduce
I'm trying to upgrade my Remix and Hydrogen version to the latest (2.9.1 and 2024.4.1, respectively). And so also need to upgrade to latest versions of dependent libraries, one of those was mini-oxygen, which is now a requirement.
When I try to run locally with
shopify hydrogen dev --codegen
, I get an error with Miniflare:But this isn't all, I thought perhaps I could do an Oxygen deployment and my environment (for e.g.
workerd
) would not be a hinderance. While doing this I get the following, even more obscure error:This doesn't really point me to anything at all, I've played around with a few different versions but always come back to this error. Could someone please enlighten me around what could be happening here?
My Github action that has this error (as well as my Shopify Hydrogen demo store) is here: https://github.com/Nosto/shopify-hydrogen-demo/actions/runs/8938871131/job/24553842268. The branch in which I'm upgrading to the latest version is here: Nosto/shopify-hydrogen-demo#41 (PR for diff of changes from a fully functional main branch).
Expected Behavior
Oxygen deployment should work.
Actual Behavior
Using mini-oxygen, version 3.0.1, results in an unexpected error (described above)
The text was updated successfully, but these errors were encountered: