You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm install does not run prepare script for local file dependencies #459
Imagine I have package-a that depends on the package-b using the file specifier.
For example we have this dependency line in the package.json of package-a:
If I run npm install in package-a then npm correctly installs package-b dependencies.
But it only runs preinstall and postinstall scripts and ignores prepare script.
If I run npm install directly in package-b then it successfully runs the prepare script.
Expected Behavior
It should run prepare script for local dependencies (package-b) like it would for github dependencies. This gets very confusing for npm users as npm install would run inconsistent scripts for different dependency types.
References
I think #321 is related but it seems fixed in the latest version.
npm version
I use node v12.13.0 and npm 6.13.0
Reacted by David Stensland, Brian Vander Schaaf, Gittenburg, Michael Gallagher, John Winston, Aram Panasenco, Andrew and Félix Lasseux
The same thing is happening to me. I also tried to install package-b in another project (npm install "../folder/package-a/package-b") and I got the same result: package is installed, but no prepare or prepublish script ran. Is this an expected behavior?
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Activity
qrosmeli commentedon Nov 26, 2019
The same thing is happening to me. I also tried to install
package-bin another project (npm install "../folder/package-a/package-b") and I got the same result: package is installed, but noprepareorprepublishscript ran. Is this an expected behavior?I have
node v10.16.0andnpm v6.9.0.shrinktofit commentedon Dec 23, 2020
Any updates?
darcyclarke commentedon Jun 2, 2021
npm
v6is no longer in active development; We will continue to push security releases tov6at our team's discretion as-per our Support Policy.If your bug is preproducible on
v7, please re-file this issue using our new issue template.If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Closing: This is an automated message.
darcyclarke commentedon Jun 2, 2021
npm
v6is no longer in active development; We will continue to push security releases tov6at our team's discretion as-per our Support Policy.If your bug is preproducible on
v7, please re-file this issue using our new issue template.If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Closing: This is an automated message.