4 ms·
> you always get v1 when you install (which I never understood) Yeah, they really wanted you to install yarn's source to your repo, which is why they don't let
by orra 3y ago
> you always get v1 when you install (which I never understood)
Yeah, they really wanted you to install yarn's source to your repo, which is why they don't let you `npm install` yarn v2 (or higher). That's maybe great for monorepos, but personally I find it ugly.
Thankfully now you can use `corepack`, which is shipped with npm. This way you can specify a version of yarn in packages.json, in the `packageManager` field. That is, without committing yarn's source to your repo.