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

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