Skip to content

Cannot find module .../bin/pnpm.cjs after upgrading from Corepack <=0.34.4 with pnpm 12 cached #901

Description

@abappi19

Repro: https://github.com/abappi19/corepack-stale-cache-repro

$ npx corepack@0.34.0 install          # package.json pins pnpm@12.2.1
$ npx corepack@0.36.0 pnpm --version
Error: Cannot find module '<COREPACK_HOME>/v1/pnpm/12.2.1/bin/pnpm.cjs'
  • Corepack <=0.34.4 caches pnpm 12 with bin: ./bin/pnpm.cjs, a file pnpm 12 doesn't ship, and later releases reuse that record as is (corepackUtils.ts).
  • Temporary workaround: corepack cache clean.

Expected: Corepack reinstalls the version when its recorded bins are missing.

AI disclosure: I used a coding agent to help investigate and build the repro, and verified the cause against the source myself.

Activity

  1. abappi19 commented on Oct 6, 2026

    @abappi19
    Author

    Fix in #902.

  2. MikeMcC399 commented on Oct 7, 2026

    @MikeMcC399
    Contributor

    pnpm 12 installation instructions no longer recommend using Corepack with pnpm 12.

    See also #687 (comment) from the pnpm maintainer.

    I'm not sure if your PR #902 to fix the issue you reported will receive attention if there is no interest anymore from pnpm.

    Since you already found a workaround, it looks like you are not blocked personally.

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