-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Hook Scripts Not Run on npm install
#2692
Comments
|
I can confirm that lifecycle hooks do not run, this is probably a regression and is impacting our users in asdf-nodejs. There's any work on going to fix this? |
In my case Actually, it would be nice if logs were printed to the console, because there can be useful messages for the user. Especially, the messages which are printed by the npm can be silent in case of its own logs, but I think it's logical to print all messages from user-defined scripts. |
@RussCoder the entire reason npm 7 changed this was to prevent user-defined scripts from injecting ads into people's terminals. |
|
|
Ok thanks @wraithgar ! |
First of all, thanks for all of the work being done on the npm CLI and the ecosystem! Tons of new amazing things in v7.
Current Behavior:
Hook scripts (documented in the docs here) seem to no longer get run for npm v7.
For example, an executable file at
node_modules/.hooks/postinstall
with the following contents not get run:I also tried this:
This will not get run during
npm install
ornpm install <pkg name>
Expected Behavior:
The hook scripts should be run
Steps To Reproduce:
node_modules/.hooks/postinstall
npm install
Environment:
Alternatives considered
Maybe Hook Scripts are no longer supported? In this case, they should be removed from the documentation.
The text was updated successfully, but these errors were encountered: