Skip to content
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

Starter template does not work with yarn 2/3 #607

Closed
cyberwombat opened this issue Mar 1, 2023 · 2 comments
Closed

Starter template does not work with yarn 2/3 #607

cyberwombat opened this issue Mar 1, 2023 · 2 comments

Comments

@cyberwombat
Copy link

cyberwombat commented Mar 1, 2023

What is the location of your example repository?

No response

What version of Hydrogen are you using?

N/A

What version of Remix are you using?

No response

Steps to Reproduce

Using yarn 3.2.4 the steps to initialized a new project: yarn create @shopify/hydrogen@latest is invalid. I think its meant for that old outdated yarn v1.

Running this results in:
Screenshot 2023-03-01 at 3 51 33 PM

And yes my internet connection is just fine.

I am on MacOS ventura, NodeJS 18.

This works fine using npm.

Expected Behavior

I would expect the demo store to be installed.

Actual Behavior

Permission error as posted above.

@frandiox
Copy link
Contributor

frandiox commented Mar 2, 2023

Apparently, in Yarn 2+ the package is installed in a location where Node doesn't have rights to write to filedisk. This is a problem because we are downloading templates and storing them within the package.

Perhaps we could ask for an alternative path to store templates, or use some sort of cache in ~/....

In any case, you can probably create the project using NPM instead, and then install deps and run it with Yarn v2+?

@cyberwombat
Copy link
Author

Ya starting w npm works. Additionally one needs to ensure PmP is not used with a .yarnrc.yml with nodeLinker: node-modules.

I guess there is no solution moving forward except to not use yarn so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants