You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 returnsnull
asOxygen.env
isundefined
.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
Additional context
The text was updated successfully, but these errors were encountered: