Repository navigation
pnpm 12 cannot run because native binaries cannot execute in StackBlitz WebContainers #2151
Description
Companion StackBlitz issue to pnpm issue pnpm/pnpm#14018
Describe the bug
pnpm 12 cannot run in StackBlitz WebContainers because pnpm 12 uses a native executable which WebContainers cannot execute.
Installing pnpm 12 with npm results in a launcher that does not run pnpm (also when directly installing and running the Linux x64 ELF binary via @pnpm/exe.linux-x64).
Link to the blitz that caused the error
https://stackblitz.com/edit/github-fuwsaec6?file=pnpm-workspace.yaml
Steps to reproduce
- Visit the reproduction URL above
- Install pnpm 12 using the StackBlitz writable-prefix workaround detailed in issue #2149
~/projects/github-fuwsaec6 ❯ npm install --global --prefix "$HOME/.local" pnpm@next-12 changed 1 package in 6s
- Attempt to print the pnpm 12 version number or install dependencies, and observe that neither command runs pnpm successfully 💥
~/projects/github-fuwsaec6 ❯ "$HOME/.local/bin/pnpm" --version jsh 1.0 (x64-linux) ~/projects/github-fuwsaec6 ❯ "$HOME/.local/bin/pnpm" install /home/.local/bin/pnpm: line 4: a command can only contain words and redirects
Attempts to run pnpm 12 via npx or directly installing the Linux x64 executable package @pnpm/exe.linux-x64 also fail in the same way:
~/projects/github-fuwsaec6 10s
❯ npx --yes pnpm@next-12 --version
jsh 1.0 (x64-linux)
~/projects/github-fuwsaec6 9s
❯ npx --yes pnpm@next-12 install
/home/.npm/_npx/4ba242780a651c33/node_modules/.bin/pnpm: line 4: a command can only contain words and redirects
~/projects/github-fuwsaec6
❯ npm install --prefix "$HOME/pnpm12-test" @pnpm/exe.linux-x64@12.0.0-rc.7
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @pnpm/exe.linux-x64@12.0.0-rc.7: wanted {"os":"linux","cpu":"x64","libc":"glibc"} (current: {"os":"linux","cpu":"x64","libc":null})
npm error notsup Valid os: linux
npm error notsup Actual os: linux
npm error notsup Valid cpu: x64
npm error notsup Actual cpu: x64
npm error notsup Valid libc: glibc
npm error notsup Actual libc: null
~/projects/github-fuwsaec6
❯ npm install --prefix "$HOME/pnpm12-test" --force @pnpm/exe.linux-x64@12.0.0-rc.7
npm warn using --force Recommended protections disabled.
added 1 package in 2s
~/projects/github-fuwsaec6
❯ "$HOME/pnpm12-test/node_modules/@pnpm/exe.linux-x64/pnpm" --version
jsh 1.0 (x64-linux)Investigating a bit further, the installed pnpm 12 executable starts with the ELF magic bytes 0x7F 45 4C 46 (127, 69, 76, 70 in decimal), confirming that it is a native Linux ELF binary:
~/projects/github-fuwsaec6
❯ node --input-type=module --eval "import fs from 'node:fs'; const b = fs.readFileSync('$HOME/pnpm12-test/node_modules/@pnpm/exe.linux-x64/pnpm'); console.log([...b.subarray(0, 4)], b.subarray(1, 4).toString())"
[ 127, 69, 76, 70 ] ELFExpected behavior
pnpm 12 can run and install dependencies in StackBlitz WebContainers.
More generally, WebContainers should consider recommending support pathways for package managers such as pnpm 12 (and other software) that use native Linux executables.
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
- OS: macOS Tahoe 26.5.2 (25F84)
- Browser: Chrome
- Version: 151.0.7922.138 (macOS)
Additional context
Related issues:
- bundled pnpm 8.15.6: Ancient included pnpm 8.15.6 fails out of the box on modern pnpm-workspace.yaml without packages #2149
- pnpm 11
node:sqliteincompatibility: pnpm 11 cannot install dependencies becausenode:sqliteDatabaseSyncmethods are missing #2150
In pnpm/pnpm#14018 (comment), zkochan noted that pnpm 12 may have WASM compat challenges:
as far as I understand v12 would need to be compatible with WASM, which was not possible last I checked
cc @SamVerschueren if this should be reported some other way or in stackblitz/core, let me know
Activity
bolt-new-by-stackblitz commentedon Aug 22, 2026