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

if yarn v2+ is globally then prefer npm or recommend to downgrade to yarn classic globally #1583

Open
saihaj opened this issue Feb 12, 2024 · 0 comments
Labels

Comments

@saihaj
Copy link
Member

saihaj commented Feb 12, 2024

Yarn 2+ has a different way to how they hoist modules but also not ideal to have those installed globally installed . From Yarn docs:

The preferred way to manage Yarn is by-project and through Corepack, a tool shipped by default with Node.js. Modern releases of Yarn aren't meant to be installed globally, or from npm.
So going to yarn classic aka yarn@v1 globally solves the issue or simply using npm fixes the issue.
https://yarnpkg.com/getting-started/install

We can improve the CLI if globally yarn installed is not classic prefer npm or if npm somehow is not globally available recommend to downgrade to yarn classic to reduce confusion.

Another thing I am thinking, breaking change but by default avoid doing install and instead user provides a flag on what package manager they want to use.

Related

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

No branches or pull requests

1 participant