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
Error: Cannot find module ... 'pnpm.cjs' when using pnpm 12 in Volta v1.1.1 on macOS #2114
When trying to use pnpm 12 installed via Volta v1.1.1 on macOS Tahoe 26.7, it looks for a pnpm.cjs file that is not present.
# Install pnpm 12 via Volta
volta install pnpm@12.4.2
success: installed and set pnpm@12.4.2 as default
# Try running a `pnpm install` in my repo:
pnpm install --no-frozen-lockfile
node:internal/modules/cjs/loader:1459
throw err;
^
Error: Cannot find module '/Users/jamie/.volta/tools/image/pnpm/12.4.2/bin/pnpm.cjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:1456:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1066:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1071:22)
at Module._load (node:internal/modules/cjs/loader:1242:25)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
changed the title [-]Error: Cannot find module ... 'pnpm.cjs' when using pnpm 12[/-][+]Error: Cannot find module ... 'pnpm.cjs' when using pnpm 12 in Volta v1.1.1 on macOS[/+]on Sep 18, 2026
Activity
shirakaba commentedon Sep 18, 2026
Workaround
Copy the following
pnpm.cjsfile into the expected location,~/.volta/tools/image/pnpm/12.4.2/bin/pnpm.cjs:pnpm installworked successfully for me after that.The story behind the file
I found this file provided with pnpm v11.18.0, and it looked version-agnostic, so I tried it out, and indeed it worked for pnpm v12.
[-]Error: Cannot find module ... 'pnpm.cjs' when using pnpm 12[/-][+]Error: Cannot find module ... 'pnpm.cjs' when using pnpm 12 in Volta v1.1.1 on macOS[/+]ci(e2e): Run E2E tests with pnpm 12 (#25334)
chore: Move the monorepo from Yarn 1 to pnpm 12 (#25354)
chore: Pin pnpm 10 in Volta and remove .npmrc (#25641)
chore: Replace Volta with pnpm-managed node versions (#25689)