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

How to persist yarn version to classic #1689

Open
garysassano opened this issue Feb 11, 2024 · 2 comments
Open

How to persist yarn version to classic #1689

garysassano opened this issue Feb 11, 2024 · 2 comments

Comments

@garysassano
Copy link

garysassano commented Feb 11, 2024

I installed yarn 4.0.2 using volta, but whenever I execute yarn set version classic, it reverts back to version 4.0.2 the next time I launch my IDE.

@favna
Copy link

favna commented Feb 12, 2024

Any particular reason you want to stick to Yarn classic? Yarn berry is much faster and much more feature rich. Yarn classic is also deprecated and not recommended for use anymore by the Yarn team. If by chance you want to use Yarn classic because of pnp mode that Yarn berry had, you can very simply configure Yarn to use node_modules with yarn config set nodeLinker node-modules, see https://yarnpkg.com/configuration/yarnrc#nodeLinker. Once you have configured the nodeLinker, you probably also want to enable global cache with yarn config set enableGlobalCache true (https://yarnpkg.com/configuration/yarnrc#enableGlobalCache) and once that is done Yarn berry will function just like Yarn classic for how it installs dependencies except for all the advantages of speed that Yarn berry brings with it.

@garysassano
Copy link
Author

@favna No particular reason, other than not using yarn at all if not for building some open-source projects and all those projects are using classic version.

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