Current behavior
If a yarn create command is run following installation of Corepack, then the unsupported Yarn v1 Classic 1.22.22 is offered for download.
|
"yarn": { |
|
"default": "1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610", |
Expected behavior
The current version of Yarn should be proposed as default for download after installing Corepack. Currently that would mean selecting yarn@4.14.1 instead of yarn@1.22.22.
Yarn Classic v1.x is no longer supported and is marked as frozen since January 2020.
Yarn Modern v4 is the currently supported version of Yarn (see https://github.com/yarnpkg/berry/releases for current release information).
It should not be necessary to have executed
before executing yarn create.
The default Yarn version for the global install is yarn@4.14.1. It is inconsistent to have the global install for Yarn with no version specification default to Yarn v4, whereas with no global install Corepack is defaulting to Yarn v1.
Versions
Corepack 0.34.7
Ubuntu 24.04.4 LTS
Node.js 25.9.0 (Current)
Steps to reproduce
Install Node.js 25.9.0 LTS
rm -rf ~/.cache/node/corepack # if repeat testing
npm install -g corepack@latest
cd $(mktemp -d)
yarn create vite # see https://vite.dev/guide
Logs
$ cd $(mktemp -d)
yarn create vite # see https://vite.dev/guide
! Corepack is about to download https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz
? Do you want to continue? [Y/n]
Workaround
Current behavior
If a
yarn createcommand is run following installation of Corepack, then the unsupported Yarn v1 Classic 1.22.22 is offered for download.corepack/config.json
Lines 115 to 116 in fbe7f78
Expected behavior
The current version of Yarn should be proposed as default for download after installing Corepack. Currently that would mean selecting
yarn@4.14.1instead ofyarn@1.22.22.Yarn Classic v1.x is no longer supported and is marked as frozen since January 2020.
Yarn Modern v4 is the currently supported version of Yarn (see https://github.com/yarnpkg/berry/releases for current release information).
It should not be necessary to have executed
before executing
yarn create.The default Yarn version for the global install is
yarn@4.14.1. It is inconsistent to have the global install for Yarn with no version specification default to Yarn v4, whereas with no global install Corepack is defaulting to Yarn v1.Versions
Corepack
0.34.7Ubuntu
24.04.4LTSNode.js
25.9.0(Current)Steps to reproduce
Install Node.js 25.9.0 LTS
Logs
Workaround