You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MODULE_NOT_FOUND with corepack use pnpm@next-12 #873
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: pnpm@12.0.0-alpha.11
Reproducible also with: pnpm@12.0.0-rc.1
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-12
Logs
with export DEBUG=corepack
$ rm -rf ~/.cache/node/corepacknpm uninstall pnpm -g # if previously installed globallycorepack enable pnpmcd $(mktemp -d)corepack use pnpm@next-12up to date in 198msInstalling pnpm@12.0.0-alpha.11 in the project... corepack Installing pnpm@12.0.0-alpha.11 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 pnpm@12.0.0-alpha.11 is finished +0ms corepack Checking /tmp/tmp.cWjgFyIw1M/package.json +1ms corepack Checking /tmp/package.json +0ms corepack Checking /package.json +1msnode: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.0
$ rm -rf ~/.cache/node/corepacknpm uninstall pnpm -g # if previously installed globallycorepack enable pnpmcd $(mktemp -d)corepack use pnpm@next-12up to date in 151msInstalling pnpm@12.0.0-rc.6 in the project...Downloading the pnpm 12.0.0-rc.6 binary for linux-x64...Already up to dateDone in 24ms using pnpm v12.0.0-rc.6pnpm -v12.0.0-rc.6
Activity
MikeMcC399 commentedon Jul 15, 2026
This issue resembles #772 for
pnpm@11.0.0-dev.1005Executing the following, using both the latest pre-release, and the latest production pnpm@11, does however work correctly with
corepack@0.35.0: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
pnpm@12.0.0-alpha.11version 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