Repository navigation
Closed
Description
Current behavior
Executing corepack use pnpm@next-12 results in an error MODULE_NOT_FOUND
Expected behavior
Corepack should work with pnpm@12. This is however currently an Alpha a Beta release candidate release.
Steps to reproduce
First reported with: [email protected]
Reproducible also with: [email protected]
On Ubuntu 24.04.4 LTS, Node.js 24.19.0 LTS, Corepack 0.35.0
rm -rf ~/.cache/node/corepack
npm uninstall pnpm -g # if previously installed globally
corepack enable pnpm
cd $(mktemp -d)
corepack use pnpm@next-12Logs
with export DEBUG=corepack
$ rm -rf ~/.cache/node/corepack
npm uninstall pnpm -g # if previously installed globally
corepack enable pnpm
cd $(mktemp -d)
corepack use pnpm@next-12
up to date in 198ms
Installing [email protected] in the project...
corepack Installing [email protected] from https://registry.npmjs.org/pnpm/-/pnpm-12.0.0-alpha.11.tgz +0ms
corepack Downloading to /home/mike/.cache/node/corepack/v1/corepack-4919-1dff2b33.faa778 +0ms
corepack LastKnownGood file would be located at /home/mike/.cache/node/corepack/lastKnownGood.json +293ms
corepack No LastKnownGood version found in Corepack home. +2ms
corepack Download and install of [email protected] is finished +0ms
corepack Checking /tmp/tmp.cWjgFyIw1M/package.json +1ms
corepack Checking /tmp/package.json +0ms
corepack Checking /package.json +1ms
node:internal/modules/cjs/loader:1520
throw err;
^
Error: Cannot find module '/home/mike/.cache/node/corepack/v1/pnpm/12.0.0-alpha.11/bin/pnpm.mjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:1517:15)
at wrapResolveFilename (node:internal/modules/cjs/loader:1071:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1095:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1122:12)
at Module._load (node:internal/modules/cjs/loader:1294:5)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at executeUserEntryPoint (node:internal/modules/run_main:154:5)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v24.18.0Reacted by Evyatar Daud
Metadata
Metadata
Assignees
Labels
No labels
Activity
MikeMcC399 commentedon Jul 15, 2026
This issue resembles #772 for
[email protected]Executing the following, using both the latest pre-release, and the latest production pnpm@11, does however work correctly with
[email protected]:MikeMcC399 commentedon Jul 15, 2026
Cross-posted to pnpm/pnpm#13018 in this instance, since it is not clear whether a change is needed to pnpm, or an enhancement is needed to Corepack.
I noticed on https://www.npmjs.com/package/pnpm/v/12.0.0-alpha.11?activeTab=code that the
[email protected]version defines apreinstalllifecycle script, which does not exist in pnpm@11.MikeMcC399 commentedon Jul 15, 2026
MikeMcC399 commentedon Jul 26, 2026
MikeMcC399 commentedon Aug 8, 2026
MODULE_NOT_FOUNDwithcorepack use pnpm@next-12pnpm/pnpm#13018 is closed with the comment:MikeMcC399 commentedon Aug 8, 2026
#887 is now open with a proposal to make Corepack compatible with pnpm@12
feat: support pnpm v12, which is distributed as a native executable
feat: add downloadPnpmExecutable, for callers that already have the r…
MikeMcC399 commentedon Aug 15, 2026
This issue is resolved in pnpm 12.0.0-rc.6
Verification
On Ubuntu 24.04.4 LTS, Node.js 24.19.0 LTS, Corepack 0.35.0
Logs