mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
When pnpm is installed as a standalone executable in environments without a system Node.js (e.g. Docker containers), the `@pnpm/exe` preinstall script (`node setup.js`) fails because `node` is not on PATH. This broke version switching via the `packageManager` field in package.json since v10.30.2, which changed `getCurrentPackageName()` to return `@pnpm/exe` instead of platform-specific package names like `@pnpm/linux-x64`. Install with `--ignore-scripts` and link the platform-specific binary in-process instead. The setup logic is inlined because setup.js can't be loaded at runtime: `require()` fails on ESM (pnpm v11+) and `import()` is intercepted by pkg's virtual filesystem in standalone executables. Closes #10687
7 lines
276 B
Markdown
7 lines
276 B
Markdown
---
|
|
"@pnpm/tools.plugin-commands-self-updater": patch
|
|
"pnpm": patch
|
|
---
|
|
|
|
Fixed version switching via `packageManager` field failing when pnpm is installed as a standalone executable in environments without a system Node.js [#10687](https://github.com/pnpm/pnpm/issues/10687).
|