GithubHelp home page GithubHelp logo

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:' about hydrogen HOT 18 CLOSED

farhaanxxiv avatar farhaanxxiv commented on August 17, 2024 5
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:'

from hydrogen.

Comments (18)

frandiox avatar frandiox commented on August 17, 2024 2

Can you try with "@shopify/cli-hydrogen": "8.1.1" and see if the dev command works on Windows?

from hydrogen.

sbaleno avatar sbaleno commented on August 17, 2024

Also seeing this issue

from hydrogen.

gautamsi avatar gautamsi commented on August 17, 2024

this broken for Windows preventing upgrade to lates release.

from hydrogen.

Codie123 avatar Codie123 commented on August 17, 2024

image

Getting the same issue while trying to run the hydrogen app

any update on solution

from hydrogen.

shogo54 avatar shogo54 commented on August 17, 2024

I'm getting the same error on a Windows device as well

from hydrogen.

Zetxus avatar Zetxus commented on August 17, 2024

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.

from hydrogen.

farhankhangit avatar farhankhangit commented on August 17, 2024

Can someone help me resolve the same issue?

image

from hydrogen.

taksuparth avatar taksuparth commented on August 17, 2024

Use WSL

from hydrogen.

farhankhangit avatar farhankhangit commented on August 17, 2024

Okay thank you, I've set up the WSL but now I'm getting the following error:

image

Node version: 20.2.0
NPM version: 10.8.1

from hydrogen.

paul-phan avatar paul-phan commented on August 17, 2024

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?

from hydrogen.

swappaa avatar swappaa commented on August 17, 2024

I've encountered the same issue, even after downgrading to @shopify/cli-hydrogen 8.0.4.
Do you have any other solutions to fix the issue?

image

from hydrogen.

paul-phan avatar paul-phan commented on August 17, 2024

@swappaa I think you should run npm run dev instead of h2 dev

from hydrogen.

swappaa avatar swappaa commented on August 17, 2024

Thank you so much, @paul-phan. The h2 dev is working. I just installed it using npm i @shopify/[email protected] instead of manually modifying the version of @shopify/cli-hydrogen in package.json.

image

from hydrogen.

farhankhangit avatar farhankhangit commented on August 17, 2024

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]

from hydrogen.

rafael-franca avatar rafael-franca commented on August 17, 2024

@frandiox I tried here and confirm that 8.1.1 solves the problem in Windows 11.

from hydrogen.

farhankhangit avatar farhankhangit commented on August 17, 2024

@rafael-franca can you please write the steps here?

Thank you!

from hydrogen.

shogo54 avatar shogo54 commented on August 17, 2024

@farhankhangit
in package.json on line 20, you can change:

"@shopify/cli-hydrogen": "^8.1.1",

to

"@shopify/cli-hydrogen": "8.1.1",

then run npm install and npm run dev works just fine.

This fixed the problem for me on Windows 11 as well.

from hydrogen.

frandiox avatar frandiox commented on August 17, 2024

Thanks everyone for reporting and testing the fix. Closing this now ✅

from hydrogen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.