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
brew.yarn set version 2yarn -v now prints 2.0.0-rc.29.yarn set version 1yarn -v still prints 2.0.0-rc.29.Environment if relevant (please complete the following information):
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.
I'm not at my computer at the moment, but I'm pretty sure you'll find a .yarn directory in your home directory, if you delete that you should be able to install v1 again. (I had this problem when I first started using v2 as well)
I've reverted to Yarn 1 by deleting the .yarn directory at the root of the project, plus any other files added in the process. I checked out any changes made to the git repository, and then yarn --version from the project folder would again return v1.22.
Remember that Yarn 2 installs locally, confined to your project.
i'm having the same issue. it's even globally changed to yarn -v. I'm using win10 if that helps.
Even uninstalling yarn and installing it again does not help.
I "fixed" it my going into my users root directory and executing yarn set version ^1. Now it's globally back to v1
You can do Cmd + Shift + > to see hidden files. (dot files.)
I'm not sure there's anything actionable on our side at the moment, so I'm going to close this issue.
Most helpful comment
I "fixed" it my going into my users root directory and executing
yarn set version ^1. Now it's globally back to v1