pnpm: vercel/pkg distributed pnpm crashes when NODE_OPTIONS="--max-old-space-size=4096" is set
pnpm version: 6.30.1
Actual Behavior
The vercel/pkg distributed version of pnpm
seems to immediately exit with code 4 when NODE_OPTIONS
is set with --max-old-space-size
.
❯ NODE_OPTIONS="--max-old-space-size=4096" pnpm
❯ echo $?
4
- The
.cjs
version ofpnpm
does not have this bug. - This may be a
vercel/pkg
bug and not related topnpm
at all. - I haven’t had a chance to repro with a debug build yet. There will likely be better error output.
Expected Behavior
Expecting pnpm
to output its standard help message.
❯ NODE_OPTIONS="--max-old-space-size=4096" pnpm
Version 6.30.1 (compiled to binary; bundled Node.js v14.17.0)
Usage: pnpm [command] [flags]
pnpm [ -h | --help | -v | --version ]
Additional information:
node -v
prints: v17.4.0- Windows, macOS, or Linux?: Reproduced on macOS and Linux.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (19 by maintainers)
Commits related to this issue
- fix: pnpm pre-compiled binaries crash when NODE_MODULES is set This was fixed upstream in pkg-fetch 3.4: https://github.com/vercel/pkg-fetch/releases/tag/v3.4 Fixes #4319 — committed to gluxon/pnpm by gluxon 2 years ago
- fix: pnpm pre-compiled binaries crash when NODE_MODULES is set (#4823) This was fixed upstream in pkg-fetch 3.4: https://github.com/vercel/pkg-fetch/releases/tag/v3.4 close #4319 — committed to pnpm/pnpm by gluxon 2 years ago
- fix: pnpm pre-compiled binaries crash when NODE_MODULES is set (#4823) This was fixed upstream in pkg-fetch 3.4: https://github.com/vercel/pkg-fetch/releases/tag/v3.4 close #4319 — committed to pnpm/pnpm by gluxon 2 years ago
Thank you for looking into this and linking all the existing reports @BlackHole1 🙂
I just found out through research that this is a bug in https://github.com/vercel/pkg
see:
pkg desc:
https://github.com/vercel/pkg/tree/64774c5ebface08a7c787b5a5c036454c93f8140#troubleshooting
As a temporary solution, do not use the pnpm binaries.