Skip to content

corepack installs pnpm pre-releases if there exists any with a version superior than latest #473

Open

Description

@SuperchupuDev

When running corepack up on a project that uses pnpm v9, it seems to update to a pre-release version, 9.1.0-0

Activity

  1. SuperchupuDev commented on May 6, 2024

    @SuperchupuDev
    Author

    This no longer happens now that pnpm 9.1.0 is out, but there's no reason to believe it won't happen in future pnpm pre-releases

  2. changed the title [-]corepack installs pre-release version of pnpm `9.1.0-0`[/-] [+]corepack installs pnpm pre-releases if there exists any with a version superior than latest[/+] on Jun 28, 2024
  3. SuperchupuDev commented on Jun 28, 2024

    @SuperchupuDev
    Author

    9.5.0-beta.0 is out and this is still happening btw
    image

  4. hyunbinseo commented on Dec 15, 2024

    @hyunbinseo

    It's currently installing pnpm@10.0.0-beta.3 version. This is not desirable.

    corepack install --global pnpm
    # Installing pnpm@10.0.0-beta.3...
  5. magicdawn commented on Jul 25, 2025

    @magicdawn

    specify @latest tag will not allow pre-release
    for example corepack use pnpm@latest

  6. ackvf commented on Dec 10, 2025

    @ackvf

    using corepack use pnpm without the @latest will install latest. This is what I got.

    "packageManager": "pnpm@11.0.0-dev.1005+sha512.91f84a392eea348ea4852a182912d2520273a4336f933b78cc44bc931eb999923c097e9433a9b355adc1f725725ea99082fc9f032a559df832632e764c92c798",
    
  7. smac89 commented on Jul 19, 2026

    @smac89

    Rather than blindly specifying @latest, use the major version of the latest version you need, and that seems to solve the problem.

    corepack use pnpm@11
  8. MikeMcC399 commented on Jul 19, 2026

    @MikeMcC399
    Contributor
    corepack enable pnpm
    corepack install pnpm -g

    should install a working non-pre-release version. Instead it installs pnpm@12.0.0-alpha.15 pnpm@12.0.0-rc.6.

    pnpm@12.0.0-alpha.15 doesn't work (see issue #873 & pnpm/pnpm#13018).

    The pnpm version selected by corepack install pnpm or corepack use pnpm should be the same one displayed by:

    npm view pnpm version

    which is currently pnpm@11.15.0. pnpm@11.22.0

    At the moment, this issue affects only pnpm.

    • corepack install pnpm -g selects pnpm@12.0.0-alpha.15 pnpm@12.0.0-rc.6

    • corepack install npm -g selects npm@12.0.2

    • corepack install yarn -g selects yarn@4.18.0

    This issue has been open for some time now, and it seems that nobody is available to address it. It resurfaces as a problem every time there is a pre-release phase of npm or pnpm when pre-release versions are published to the npm registry.

    The pnpm@12 pre-release phase started with https://www.npmjs.com/package/pnpm/v/12.0.0-alpha.0 on Jul 5, 2026.

  9. MikeMcC399 commented on Jul 20, 2026

    @MikeMcC399
    Contributor

    A possible temporary workaround to get the latest non-pre-release version of pnpm (currently pnpm@11.15.1) could be:

    corepack install pnpm@$(npm view pnpm version) -g

    or

    corepack use pnpm@$(npm view pnpm version)

    It does not solve the original issue with corepack up, however I don't see this problem occurring at the moment because the highest pre-release is for pnpm@12.0.0. It can however potentially happen again in future, if there is a mixture of pnpm@12 pre-release and non-prerelease versions published.

    Installed corepack up
    pnpm@9.0.0 pnpm@9.15.9
    pnpm@10.0.0 pnpm@10.34.5
    pnpm@11.0.0 pnpm@11.15.1
    pnpm@12.0.0-alpha.0 pnpm@12.0.0-alpha.16
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