Skip to content

[QUESTION](arborist) What happened to global lifecycle hooks? #4282

@augustobmoura

Description

@augustobmoura

What / Why

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ws:arboristRelated to the arborist workspace

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions