Pnpm: preinstall and postinstall are run twice

Created on 23 Jul 2017  路  3Comments  路  Source: pnpm/pnpm

pnpm version: 1.8.0

Code to reproduce the issue:

see https://github.com/andreineculau/package-json-scripts

git clone https://github.com/andreineculau/package-json-scripts
pnpm install # lists preinstall, preinstall, install, postinstall, postinstall, ...

npm install # lists preinstall, install, postinstall, ...

Additional information:

Regression after https://github.com/pnpm/pnpm/issues/854

npm run install actually calls preinstall and postinstall on its own :(
See https://github.com/npm/npm/blob/latest/lib/run-script.js#L157

bug

All 3 comments

oh, indeed, thanks. I'll fix it soon

Fix published in v1.8.1

confirmed that it works as intended now. Thanks (even for the "beautiful" hack)!

PS: I've opened up an issue with npm on the topic https://github.com/npm/npm/issues/17901

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsumners picture jsumners  路  4Comments

jsumners picture jsumners  路  3Comments

andreineculau picture andreineculau  路  5Comments

andreypopp picture andreypopp  路  5Comments

zkochan picture zkochan  路  3Comments