[Bug] Can't switch back to Yarn v1 after trying out Yarn v2
See original GitHub issue- I’d be willing to implement a fix
Describe the bug
I wanted to try out Yarn v2, so I did yarn set version 2
. This worked. But now I can’t switch back to v1:
> yarn set version 1
^[➤ YN0000: Selecting the highest release amongst 1.22.0 and 18 others
➤ YN0000: Downloading https://github.com/yarnpkg/yarn/releases/download/v1.22.0/yarn-1.22.0.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-1.22.0.js
➤ YN0000: Done in 2.35s
> yarn -v
2.0.0-rc.29
To Reproduce
- Start with a regular Yarn 1 installation on macOS, installed via
brew
. - Run
yarn set version 2
- Running
yarn -v
now prints2.0.0-rc.29
.
- Run
yarn set version 1
- The output makes it look like this worked, but it didn’t –
yarn -v
still prints2.0.0-rc.29
.
Environment if relevant (please complete the following information):
- OS: macOS
- Node version: v12.13.0
- Yarn version: 2.0.0-rc.29
Additional context
Sorry if I’m missing something obvious - I don’t know much about Berry/Yarn 2, I just wanted to try it out, and now I can’t get back to Yarn 1.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Migration | Yarn - Package Manager
A step-by-step and in-depth migration guide from Yarn 1 (Classic) to Yarn 2 (Berry).
Read more >How do I change the version of yarn used? - Stack Overflow
Running yarn -v shows that I currently use 0.23.2 . I ran brew upgrade yarn to get the latest version, which is 0.24.6...
Read more >Yarn 3.0 Performances, ESBuild, Better Patches
While the migration from Yarn 1 to Yarn 2 brought some discomfort, the migration to Yarn 3 should prove easier - regardless of...
Read more >It's 2021, and You Should Switch to Yarn 2 - Atomic Spin
Here are three reasons you might have waited to make the switch — and why those reasons are out of date in 2021....
Read more >Yarn lock: how it works and what you risk without maintaining ...
Important: When you install dependencies in your application or library, only the top-level yarn.lock file is respected.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I “fixed” it my going into my users root directory and executing
yarn set version ^1
. Now it’s globally back to v1i had a default in my root, deleting it did the trick