Postinstall broken for pnpm 7+
See original GitHub issueI’ve been messing around with this for a few hours. One of my dependencies (or sub-deps) includes es5-ext. When using pnpm (I’m using version 7.0.0-rc.2), the postinstall always fails with the following:
node_modules/.pnpm/es5-ext@0.10.60/node_modules/es5-ext: Running postinstall script...
ELIFECYCLE Command failed.
To replicate, install pnpm, then:
mkdir testproj
cd testproj
pnpm init
pnpm add es5-ext
OS: Linux (Pop!_OS 22.04) Nationality: Canadian
Note: I do not have node in my PATH.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
[pnpm v7] postinstall not running · Issue #4649 - GitHub
pnpm version: 7.0.0 Looks like it does not run postinstall script. Does it related to sideEffectCache? We need postinstall script to run ...
Read more >pnpm install
pnpm install is used to install all dependencies for a project. In a CI environment, installation fails if a lockfile is present but...
Read more >npm hangs on postinstall / unlock - Stack Overflow
The package on which it is hanging varies. I tried a lot of node and npm versions, as well as doing a npm...
Read more >pnpm/pnpm - Gitter
But since A depends on B, if B didn't finish first, A's postinstall will fail ... "/usr/local/bin/npm" "run" "build" 22 verbose node v13.7.1-pre...
Read more >pnpm and rules_js - Aspect's Bazel Documentation
Our story begins when some non-Bazel-specific tool (typically pnpm) performs dependency resolutions ... maybe they are broken "fum@0.0.1": ["postinstall"], ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m running into a similar issue. I have a a Docker image with a build environment for some legacy application. The Docker image installs
gulp-cli, which has a dependency ones5-ext. Building that Docker image recently started failing and I pinpointed the issue to the_postinstall.jsofes5-ext. Below you’ll find a Dockerfile to reproduce the issue. This is a stripped down version of the one I use for my legacy Gulp application. It just installses5-exton top of Node 10 / NPM 7 from NVM.Output of
docker build -t reproducer .:The error as mentioned in the
debug.log:As far as I am aware,
nodeis on thePATHin the container. See line 16 of the Dockerfile, as wel as:I noticed
122 error command sh -c node -e "try{require('./_postinstall')}catch(e){}"in the debug log, which seems like an attempt to prevent the political script from breaking builds if anything misbehaves. I think another fallback may need to be added. I have nothing against these political statements in open source projects, but IMHO they should not break existing configurations.Sorry for the late response, I was on vacation last week.
I believe I’ve fixed that with v0.10.61 (just published). If you still see any issues please report .