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
Before npm@7 we had global lifecylcle hooks, postinstall and postuninstall script files in the directory /node_modules/.hooks were run for every package being installed or removed, but since npm@7 this scripts don't run at all. This worked for both local node_modules and global $NPM_PREFIX/.npm/lib/node_modules
Is that a bug? Or global hooks were removed once and for all? This was a feature heavily used in https://github.com/asdf-vm/asdf-nodejs and we were actually thinking about a new hook suggestion that would be more useful for our use case
The text was updated successfully, but these errors were encountered:
fritzy
changed the title
[QUESTION] What happened to global lifecycle hooks?
[QUESTION](arborist) What happened to global lifecycle hooks?
Jan 20, 2022
What / Why
Before npm@7 we had global lifecylcle hooks,
postinstall
andpostuninstall
script files in the directory/node_modules/.hooks
were run for every package being installed or removed, but since npm@7 this scripts don't run at all. This worked for both localnode_modules
and global$NPM_PREFIX/.npm/lib/node_modules
Is that a bug? Or global hooks were removed once and for all? This was a feature heavily used in https://github.com/asdf-vm/asdf-nodejs and we were actually thinking about a new hook suggestion that would be more useful for our use case
The text was updated successfully, but these errors were encountered: