I'm following yarn installation doc. When I run corepack prepare yarn@stable --activate
, I'm getting Usage Error: Invalid package manager specification in CLI arguments; expected a semver version
. Anyone know what's up?
Asked
Active
Viewed 2,828 times
6

passionateLearner
- 722
- 1
- 7
- 19
-
If you have nodejs installed install it with npm `npm i --location=global yarn` – Tushar Mistry Sep 10 '22 at 16:57
-
But I do have yarn since my nodejs version is >16.10 and `yarn -v` shows 3.2.3. – passionateLearner Sep 10 '22 at 16:59
-
Check what version of yarn your projects use yarn 1 is classic and new versions use plug and play.. – Tushar Mistry Sep 10 '22 at 17:01
-
4I'm using the new version. I had to specify the semvar in command as `corepack prepare yarn@3.2.3 --activate` instead of putting `@stable` for it to work but it's bit weird that what official documentation says doesn't work. I was wondering if this is occurring to just me or everyone else. – passionateLearner Sep 10 '22 at 17:09
-
1@passionateLearner Thanks for posting this! Facing the same problem right now. – lexeme Sep 10 '22 at 19:21
1 Answers
0
As per this github issue https://github.com/yarnpkg/berry/issues/4132, you should corepack enable
instead of corepack prepare

Marcio Faria
- 11