Unsupported Yarn v1 Classic used as default after Corepack installation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
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.
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
corepack install -g yarn
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
corepack install -g yarn
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting config.json at the linked lines, then reproduce the behavior with yarn create vite in a fresh temporary directory after installing Corepack. Done means the default download prompt proposes yarn@4.14.1 rather than yarn@1.22.22 without requiring corepack install -g yarn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100