Skip to content

Docs on Corepack need to be expanded #6728

Open

Description

@PaulRBerg

Yarn's docs on Corepack should be expanded to explain:

  • Whether Corepack is required for Yarn Berry, or it's just a nice way of installing the CLI
  • What will Yarn do about the fact that Node.js is removing support for Corepack
  • What happens when Corepack is not used, i.e., there's a Yarn executable under .yarn/releases, etc.
  • What happens when Corepack is used, i.e., there's no Yarn executable and Corepack handles that

URL: https://yarnpkg.com/corepack

Related: #5949

Activity

  1. arcanis commented on Mar 16, 2025

    @arcanis
    Member

    What will Yarn do about the fact that Node.js is removing support for Corepack

    They are not, a vote is in progress as of last week. The thread you link is a non-binding circlejerk.

    If Node.js decides to neuter Corepack in any way (which we'll see depending on the results of the vote) we'll take notice and act accordingly.

  2. BurningEnlightenment commented on Mar 19, 2025

    @BurningEnlightenment

    The TSC voted to remove corepack in a future (25+) release:

    Winning candidate: Phase out later: stop distributing Corepack (i.e. the distribution will no longer contain a corepack executable) on future (i.e. 25+) release lines of Node.js – existing release lines as well as the very next (i.e. 24.x) will keep it as experimental.

    nodejs/TSC#1697 (comment)

  3. arcanis commented on Mar 19, 2025

    @arcanis
    Member

    I updated the getting started page, help welcome to update other references in the doc.

    What will Yarn do about the fact that nodejs/package-maintenance#606

    As for long-term plans it's a little soon to be certain what the alternative to Corepack will be, but I believe likely we'll keep the versioning mechanism while using a different implementation than Corepack. For the moment I'm focusing on the next two Yarn majors, and once this job is done we'll have more clarity as to what we need.

  4. MikeMcC399 commented on Mar 19, 2025

    @MikeMcC399
    Contributor

    The vote does not change much. The Node.js TSC decided to continue distributing Corepack with the next release of Node.js which is 24.x and has end-of-life in April 2028. Users who start in Oct 2025 with Node.js 25.x when it's released would install Corepack with npm, unless Corepack adds a different mechanism to install it in the meantime. Many pnpm users are already installing Corepack with npm due to a package signing issue that occurred in Jan 2025, and which required updating independently of the Node.js version, so there is no hard reliance on Corepack being distributed with Node.js.

  5. MikeMcC399 commented on Mar 20, 2025

    @MikeMcC399
    Contributor

    For me the barrier to using Corepack in production is that it is marked as experimental. I don't care though if I need to install it manually instead of having it delivered together with Node.js.

    I would need to see it declared as stable with an on-going support commitment and endorsement for use in production.

    https://nodejs.org/docs/latest/api/corepack.html has it in the category Experimental
    "Non-backward compatible changes or removal may occur in any future release. Use of the feature is not recommended in production environments."

  6. dcorking commented on May 21, 2025

    @dcorking

    @MikeMcC399 do you recommend installing yarn directly via npm in a production script? (instead of via corepack)

    npm install --global @yarnpkg/[email protected]
  7. MikeMcC399 commented on May 21, 2025

    @MikeMcC399
    Contributor

    @dcorking

    @MikeMcC399 do you recommend installing yarn directly via npm in a production script? (instead of via corepack)

    npm install --global @yarnpkg/[email protected]

  8. dhouck commented on Aug 14, 2026

    @dhouck

    One of the things that should be changed here is the migration guide. It assumes anyone with Node 18+ has Corepack, which is no longer true. And in particular, given that Yarn 1 has yarn global support but Berry doesnʼt, Iʼm wondering if yarn global add corepack is supported. I expect so since Iʼm not getting rid of yarn 1?

  9. luckydonald commented on Oct 3, 2026

    @luckydonald

    I feel pretty silly, to now have to:

    1. Install nvm.
    2. Use nvm to get npm.
    3. Use npm to install corepack
    4. Use corepack to install yarn

    In the python world, uv basically combined the pyenv (nvm), virtualenv(~local node_modules) & pip (npm), and can be installed in the common expected ways, including brew install uv or pip install uv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions