Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.34k stars 259 forks source link

Vite renderToReadableStream error after upgrading cli-hydrogen from 7 to 8.0.4 #2174

Open belazaras opened 3 months ago

belazaras commented 3 months ago

What is the location of your example repository?

No response

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

8.0.4

What version of Remix are you using?

2

Steps to Reproduce

just launch shopify hydrogen dev and navigate to localhost.

Expected Behavior

it should just work.

Actual Behavior

image

tried many things and didn't work, included what's suggested in the image. also compared to a new install but can't figure what old code might be breaking it, or which packages might be incompatible.

frandiox commented 3 months ago

Did you use h2 setup vite to migrate? Make sure your vite.config.js is something like this and that you have "type": "module" in your package.json

Also, as per the release notes, make sure you have installed @shopify/mini-oxygen in your project.

belazaras commented 3 months ago

h2 setup vite says command not found. all the rest I did and when booting server it throws this exports error now:

image
frandiox commented 3 months ago

Try with what's explained here: https://github.com/Shopify/hydrogen/issues/2129#issuecomment-2119588510

belazaras commented 2 months ago

If I add remix-run/dev to ssr.optimizeDeps.include which is where the exports is not defined, it causes a trillion other issues for vite