-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Milestone
Description
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:
#!/usr/bin/env node
console.log('ran hook');I also tried this:
#!/usr/bin/env bash
echo 'ran hook'This will not get run during npm install or npm install <pkg name>
Expected Behavior:
The hook scripts should be run
Steps To Reproduce:
- Create a new package with one of the file contents above in an executable file under
node_modules/.hooks/postinstall - Run
npm install - Hook script does not get run
Environment:
- OS: macOS 11.2.1
- Node: 15.8.0
- npm: 7.5.4
Alternatives considered
Maybe Hook Scripts are no longer supported? In this case, they should be removed from the documentation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release