-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
We use node --watch
for some processes so they restart if a file changes. We have a monorepo setup. We noticed that if a package has peer dependencies, node
does not detect changes to files in that package.
To reproduce
- Create a monorepo with two packages, and one depends on the other
- The first package should have at least one peer dependency
- Have a script in the second which imports something from the first, and runs forever (e.g. an HTTP server)
- Run the script
- Change the file in the other workspace
- Notice whether
node
detects the change restarts the process
Environment
System:
OS: Linux 6.8 Linux Mint 22.1 (Xia)
CPU: (24) x64 AMD Ryzen 9 7900X3D 12-Core Processor
Binaries:
Node: 24.4.1 - /tmp/xfs-e270292d/node
Yarn: 4.9.2 - /tmp/xfs-e270292d/yarn
npm: 11.4.2 - ~/.nvm/versions/node/v24.4.1/bin/npm
Additional context
It would be nice if the workspaces didn't use virtual paths somehow, maybe an option to disable that?
In general the virtual paths and multiple instances of dependencies cause us a lot of headaches, it would be nice to have a version of the pnp linker, or an option for it, that disables this behavior completely but still has the other advantages of pnp.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working