Troubleshoot hydrogen deployment to oxygen

What’s the best way to troubleshoot this deployment to oxygen? I have my project working locally but when I deploy it it’s hitting an error:

Uncaught Error: No such module “.prisma/client/edge”.

I even added a step above this in the github action to list the contents of that directory and the file definitely exists.

Something I recall seeing in my local environment was that when I had '@prisma/client/edge included in my vite.config.js optimizeDeps, they weren’t taking effect. But then I removed them and the next time I ran npm run dev, it auto-added them in. And from that point on they took effect.

I’m not sure how to replicate that in the build script so that oxygen will pick it up.

Running shopify hydrogen preview --build builds and starts the project with workerd (not NodeJS). Does the same error show up when you run that?

1 Like

Oh nice thanks. I’ll try to circle back to this. For the time being I actually moved off of hydrogen because of the snags I’m hitting around an external database connection (related to this).

Makes sense. If you are using an external database, it’s probably best not to use Oxygen because you’ll have limitations on what’s possible with cloudflare workers. Hydrogen is on top Remix, and should be deployable to any destination that Remix is. But we make it easier if deploying to Oxygen, so it might be best to just use Remix directly.