Skip to content

[BUG] dependencies hook is not triggered when dependencies change for a local dependency #8984

@LeaVerou

Description

@LeaVerou

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Suppose we have two adjacent packages, A and B. B has installed A via npm i ../A. When A's dependencies change, B's dependencies script is not triggered.

Expected Behavior

B’s dependencies hook should be triggered whenever its dependencies change, which include A. This works correctly for npm link, so the internal handling for symlinks must be there.

Steps To Reproduce

See above

Environment

  • npm: 11.10.0
  • Node.js: v25.0.0
  • OS Name: MacOS 15.6
  • System Model Name: Macbook Pro
  • npm config:
; "user" config from /Users/leaverou/.npmrc

//registry.npmjs.org/:_authToken = (protected)

; node bin location = /Users/leaverou/.nvm/versions/node/v25.0.0/bin/node
; node version = v25.0.0
; npm local prefix = /Users/leaverou/Documents/gh
; npm version = 11.10.0
; cwd = /Users/leaverou/Documents/gh
; HOME = /Users/leaverou
; Run `npm config ls -l` to show all defaults.
leaverou@MacBook-Pro-37 gh % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions