Skip to content
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] Oxygen is not defined Error on Deployment #2501

Open
kazuhoishida opened this issue Mar 23, 2023 · 0 comments
Open

[BUG] Oxygen is not defined Error on Deployment #2501

kazuhoishida opened this issue Mar 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kazuhoishida
Copy link

Describe the bug

I attempted to deploy a Hydrogen project to Oxygen, but it failed with an error stating 'Oxygen is not defined'.
I'm fetching data via the Contentful API (created a custom hook by referring to this documentation), but it seems that those environment variables in Oxygen.env are causing the problem.
Looking into the error logs on Github Actions, the build process appears to be successful (shopify hydrogen build also succeeds in the local environment btw), and the error occurs during uploading deployment process.

If I hard-code those secret tokens in a file, the deployment to Oxygen succeeds.

If I use getOxygenVariable() to get the Contentful environment variables, the function returns null as Oxygen.env is undefined.
As a result, the Github Actions deployment itself succeeds, (but naturally), the site preview is not displayed.

Does anybody have an idea what went wrong?

Screenshots

Screenshot 2023-03-24 at 2 25 04

Additional context

  • @shopify/hydrogen@1.6.5
  • Node version v17.9.1
@kazuhoishida kazuhoishida added the bug Something isn't working label Mar 23, 2023
@kazuhoishida kazuhoishida changed the title [BUG]Oxygen is not defined when uploading deployment [BUG] Oxygen is not defined Error on Deployment Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant