Skip to content
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] Docs for npm@7 mention hook scripts which are no longer supported #2762

Closed
t1m0thyj opened this issue Feb 23, 2021 · 1 comment
Closed
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@t1m0thyj
Copy link

Current Behavior:

The docs for npm@7 mention hook scripts as a feature:

If you want to run a specific script at a specific lifecycle event for ALL packages, then you can use a hook script.

Place an executable file at node_modules/.hooks/{eventname}...

^ https://github.com/npm/cli/blob/latest/docs/content/using-npm/scripts.md#hook-scripts

Expected Behavior:

This section should be removed from NPM docs since the hook script functionality no longer works. It appears to be no longer supported in npm@7, according to the @npmcli/run-script readme:

Hook scripts are not run by this module. If the caller wishes to run hook scripts, then they can override the default package script with an explicit cmd option pointing to the node_modules/.hook/${event} script.

^ https://github.com/npm/run-script#differences-from-npm-lifecycle

Steps To Reproduce:

n/a

Environment:

n/a

@t1m0thyj t1m0thyj added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Feb 23, 2021
@t1m0thyj
Copy link
Author

Duplicate of #2692 - sorry for not noticing before creating new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

1 participant