Repository navigation
docs: align corepack installation instructions - #7094
MikeMcC399 wants to merge 1 commit into
Conversation
|
This adds the note:
But I think the instructions could be more prescriptive and explicit. Does Node.js 24 also work with the I would hope to see the preferred command I recognize that there may be overlap. Maybe some versions of Node support /either/ |
|
Supported versions of Node.js are listed on Node.js release: currently Node.js 20, 22, 24 & 25.
If you install with Yarn 4 has a minimum requirement of Node.js 18.12, so I believe that this would be the lowest version that needs to be documented. See https://yarnpkg.com/advanced/changelog#400
At the end of this month on 2026-04-30 Node.js 20 also transitions into end-of-life status. |
|
I tried implementing this in one of my projects (example runs). The most reliable way for me to enable corepack in any version of Node.js from 18.12 through current has been: corepack enable || npm install -g corepackThis one command works in any version of Node.js that Yarn Berry supports and it results in Yarn being immediately able to run afterwards. It works in any environment, including vanilla installs as well custom runners. And it runs in the fastest runtime in every circumstance. |
|
Thanks for sharing your command! |
|
Note that, for Yarn, our plan will be to recommend using Yarn Switch once it's stable (end of summer?). |
Will that work with Yarn Berry or only with Yarn Zpm? |
|
It supports all versions of Yarn (classic, berry, and zpm) |
|
Will you still consider this PR or do you want to freeze the text until Yarn Switch can replace Corepack? |
|
You say it supports (installing) all versions of Yarn. But will the Yarn classic release a new version that includes Yarn Switch by default? |
|
The rest of the Corepack page describing strategy is also out of date, however I can't provide those details, so perhaps the page should just be frozen until Switch is ready? |
|
Withdrawing this suggestion, as the whole Corepack page needs revising, and I'm not able to provide this input since it concerns strategy and future plans. |
|
I think the published version now resolves the issues we discussed here. |
|
https://yarnpkg.com/corepack remains outdated |
What's the problem this PR addresses?
The Installation page says to install Corepack with:
The Corepack page gives different information, which is partially outdated:
As described in the Node.js Distribution Policy
Also, according to nodejs/corepack#686, installing with
npm install -g corepackautomatically enables Corepack.How did you fix it?
Make documentation changes to packages/docusaurus/docs/getting-started/extra/corepack.mdx to be published to the Corepack page.
Checklist