I can see corepack about to download yarn v1.22 when I run the yarn
command:
user@laptop:~/empty-directory$ yarn
Corepack is about to download https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz.
Do you want to continue? [Y/n]
I'm using corepack v0.25.2.
The latest release of yarn is v4.11 at the time of writing: https://github.com/yarnpkg/berry/releases
Why is this version being downloaded, and how can I make yarn 4.1.1 the default version that Corepack uses?
If the packageManger field in package.json is not specified, Corepack will download the global version of the package manager that Corepack is configured with (Corepack also calls these 'Known Good Releases'). To use a different version of yarn, you can either:
"packageManger": "[email protected]"
), then runyarn
to install the dependencies using that package manager version.corepack up -g [email protected]
.Links