Getting "write EPIPE" error when running shopify hydrogen dev

Topic summary

A developer encountered a “write EPIPE” error when running npm run dev or shopify hydrogen dev for a Shopify Hydrogen project. The error originates from MiniOxygen/Miniflare and prevents the development server from starting.

Environment details:

  • OS: Ubuntu 20.04.6 LTS
  • Node.js: v20.19.2
  • Shopify CLI: 3.81.0

Current status: The issue appears to be OS-specific to Linux/Ubuntu. The original poster resolved it by switching from Ubuntu 20.04 to Windows, where the project ran without errors.

Additional findings:

  • Another user confirmed the same issue on Linux, even with a fresh Hydrogen installation using the quickstart flag
  • Node version changes (upgrading/downgrading) did not resolve the problem
  • The same codebase worked for colleagues, suggesting environment-specific factors

Potential solution: The original poster mentions that Shopify’s Hydrogen changelog indicates this issue may have been recently fixed. Updating to the latest Hydrogen version might resolve the error without requiring an OS change, though this remains unconfirmed.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Hi Community,

I’m working on a Hydrogen project on my local machine and getting an error when I run npm run dev (or shopify hydrogen dev). it’s not start the server and getting error

MiniOxygen: Error during evaluation: Error: write EPIPE
write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161)
at writeGeneric (node:internal/stream_base_commons:152)
at _writeGeneric (node:net:958)
at _write (node:net:970)
at writeOrBuffer (node:internal/streams/writable:572)

at updateConfig (miniflare/src/runtime/index.ts:154)

What does this write EPIPE error mean in the context of miniflare and is there a fix or workaround? Is Node.js 20 officially supported for Hydrogen development?
How to fix it??

My Setup:
OS: Ubuntu 20.04.6 LTS

Node: v20.19.2

npm: 10.8.2

Shopify CLI: 3.81.0

Thanks in advance!

1 Like

Hi codingenger,

Thanks a lot for your response and suggestions!

I wanted to share an update — the issue seems to have been related to my environment. When I switched from Ubuntu 20.04 to Windows, the write EPIPE error stopped occurring, and the Hydrogen project started running smoothly with shopify hydrogen dev.

So it looks like the error might be OS-specific or related to how Node.js and Miniflare interact on Ubuntu in this case.

Appreciate the help! This might help others facing a similar issue on Linux.

Thanks again!

— Rohan

I’m having the same issue. I tried downgrading the node version and also upgarding it to the latest one as well. The craziest part is that my colleague was able to run it without any issues.

I now installed hydrogen fresh with quickstart flag. then tried running using ‘npm run dev‘.The command exited with this message:

MiniOxygen: Error during evaluation: Error: write EPIPEat afterWriteDispatched (node:internal/stream_base_commons:159:15)at writeGeneric (node:internal/stream_base_commons:150:3)at Socket._writeGeneric (node:net:966:11)at Socket._write (node:net:978:8)at writeOrBuffer (node:internal/streams/writable:570:12)at _write (node:internal/streams/writable:499:10)at Socket.Writable.write (node:internal/streams/writable:508:10)at Runtime.updateConfig (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/runtime/index.ts:154:24)at Miniflare2.#assembleAndUpdateConfig (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/index.ts:1444:28)at Mutex.runWith (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/workers/shared/sync.ts:66:45) {errno: -32,code: ‘EPIPE’,syscall: ‘write’}Error: write EPIPEat afterWriteDispatched (node:internal/stream_base_commons:159:15)at writeGeneric (node:internal/stream_base_commons:150:3)at Socket._writeGeneric (node:net:966:11)at Socket._write (node:net:978:8)at writeOrBuffer (node:internal/streams/writable:570:12)at _write (node:internal/streams/writable:499:10)at Socket.Writable.write (node:internal/streams/writable:508:10)at Runtime.updateConfig (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/runtime/index.ts:154:24)at Miniflare2.#assembleAndUpdateConfig (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/index.ts:1444:28)at Mutex.runWith (/home/codilar/shopify/Codilar/Local-Hydrogen/hydrogen-quickstart/node_modules/miniflare/src/workers/shared/sync.ts:66:45)

Is there a way to make it run without changing the whole OS?

Hi sagar_codilar,

I don’t know of any other workaround. In my case, the issue went away only after I switched OS — once I moved from Ubuntu 20.04 to Windows, it started working fine.

You can check the Shopify Hydrogen changelog though, it looks like they may have fixed this issue recently. Might be worth updating to the latest version and trying again.

— Rohan