Unsupported Yarn v1 Classic used as default after Corepack installation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
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.
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
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
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.
More from nodejs/corepack
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·