-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On │ │ Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' #2208
Comments
Also seeing this issue |
this broken for Windows preventing upgrade to lates release. |
I'm getting the same error on a Windows device as well |
Can confirm this behavior on the latest version as well. Seems to be Windows specific. For the time being I'm running this on WSL and the error isn't present, but the node performance there is quite bad so I'd like to be able to run this on Windows as well. |
Use WSL |
I believe this is related to the pull request at #2087. Just try downgrading @shopify/cli-hydrogen to 8.0.4, and it work. @frandiox, @isaacroldan can you guys take a look? |
@swappaa I think you should run |
Thank you so much, @paul-phan. The h2 dev is working. I just installed it using npm i @shopify/cli-hydrogen@8.0.4 instead of manually modifying the version of @shopify/cli-hydrogen in package.json. |
For me, it was the permission issue the following command did the trick (for those who are facing the same issue) chmod -R [desired permissions] [target folder] |
Can you try with |
@frandiox I tried here and confirm that |
@rafael-franca can you please write the steps here? Thank you! |
@farhankhangit
to
then run This fixed the problem for me on Windows 11 as well. |
Thanks everyone for reporting and testing the fix. Closing this now ✅ |
What is the location of your example repository?
No response
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2024.4.3
What version of Remix are you using?
2.0.4
Steps to Reproduce
npm create @shopify/hydrogen@latest
javascript
cd {package-name} && npm run dev
Expected Behavior
It should run the remix app locally.
Actual Behavior
It's showing an error
╭─ error ─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On │
│ Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' │
│ │
│ To investigate the issue, examine this stack trace: │
│ at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:239) │
│ at defaultLoad (node:internal/modules/esm/load:120) │
│ at load (node:internal/modules/esm/loader:555) │
│ at moduleProvider (node:internal/modules/esm/loader:436) │
│ at ModuleJob (node:internal/modules/esm/module_job:76) │
│ at #createModuleJob (node:internal/modules/esm/loader:449) │
│ at getJobFromResolveResult (node:internal/modules/esm/loader:261) │
│ at getModuleJob (node:internal/modules/esm/loader:242) │
│ at import (node:internal/modules/esm/loader:474) │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
The text was updated successfully, but these errors were encountered: