hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

Hydrogen dev codegen fails on Windows with double-“Users” path causing EPERM

Open ripgrim opened this issue 7 months ago • 8 comments

What is the location of your example repository?

C:\Users\grim\hydrogen-storefront

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2025.5.1

What version of Remix are you using?

2.16.0

Steps to Reproduce

  1. On Windows, create or clone a Hydrogen storefront at C:\Users\grim\hydrogen-storefront
  2. Run pnpm install
  3. Run shopify hydrogen dev --codegen
  4. Observe that Vite tries to create directories under
    C:\Users\Users\grim\hydrogen-storefront\node_modules\…
  5. Build fails with:
    Error: EPERM: operation not permitted, mkdir 
      'C:\Users\Users\grim\hydrogen-storefront\…\+types'
    

Expected Behavior

Expected Behavior
The codegen step should create virtual-routes in the correct project path
(C:\Users\grim\Desktop\hydrogen-storefront\node_modules\…) without permission errors.

Actual Behavior

Vite/React-Router dev plugin resolves the home directory as C:\Users\Users\grim,
causing an EPERM when attempting mkdir on that invalid path.

ripgrim avatar Jun 07 '25 02:06 ripgrim