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.
Repro: https://github.com/abappi19/corepack-stale-cache-repro
bin: ./bin/pnpm.cjs, a file pnpm 12 doesn't ship, and later releases reuse that record as is (corepackUtils.ts).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.