[BUG] `dependencies` hook is not triggered when dependencies change for a local dependency
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
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 %
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the adjacent-package scenario described, with B installing A through npm i ../A, then compare it with the stated npm link behavior. Trace how local dependencies and dependency changes are handled, and consider the work complete when B’s dependencies hook runs after A’s dependencies change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100