Hydrogen Deployment Fails

hottotem
Shopify Partner
2 0 0

Hello, 

 

we are currently developing a hydrogen storefront, but are having some issues with the deployment.

We followed the guide here : 

https://shopify.dev/custom-storefronts/hydrogen/deployment#deploy-to-docker

and

https://shopify.dev/custom-storefronts/hydrogen/deployment#deploy-to-node-js

 

but we are having 2 issues.

If we go the Docker route, then the following error pops up right after starting the container:

 

ReferenceError: Response is not defined
    at Module.<anonymous> (/app/dist/node/index.js:21:5213)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

there is also a github issue on this:  https://github.com/Shopify/hydrogen/issues/1812

Will this ever be resolved or is there a workaround?

 

If we take the node.js deployment path, then the build works, starting as well, but it seems the build is ignoring our .env 

How can we provide the envs for the direct build? Also, once this is done, we can preview the shop with npm run preview, but how is it deployed? There is no docs on this unfortunately...

 

Hoping someone can help me out!

Replies 2 (2)

JakePenzo
Shopify Partner
1 0 0

Hi @hottotem, did you manage to find a solution to this?

I'm having some issues deploying to docker as well.

Thank you!

hottotem
Shopify Partner
2 0 0

unfortunately not, I went with the Node.js deployment...