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
{{ message }}
Repository navigation
[BUG] Installing dependencies of nested workspaces seems to not work properly in version 8.5+ #4774
./package.json defines the directories test-1 and test-2 as workspaces
./test-1/package.json defines the directories test-1a and test-1b as workspaces
These directories have their own dependencies:
./test-1a
./test-1b
./test2
The problem: Running npm install in ./test-1 doesn't result in installing dependencies from test-1a and test-1b in ./test-1/node_modules. The only thing that happens is symlinking ./test-1 in ./node_modules.
Expected Behavior
In versions up to 8.4.x, running npm install in a nested workspace (directory with is both a workspace for a parent directory and defines its own workspaces) resulted in installing the dependencies from workspaces defined in its package.json to ./path-to-nested-workspace/node_modules.
Steps To Reproduce
I created a repo with the setup I'm explaining.
Either see a workflow that installs dependencies of a nested workspace for 3 different npm versions:
@wraithgar Sorry for the ping, but can this get assigned a priority please? It's the 11th most thumbed up issue and it looks like this is getting completely forgotten.
PS: There are other issues with more upvotes than this one that are also labeled as "Needs triage"
Reacted by FlorianFechterTCon, Maximilian Beck, Luis Vierroth and Eric Dubé
Activity
specific npm version to avoid npm/cli#4774
agarwalvaibhav0211 commentedon Jul 22, 2023
Is there any ETA for this?
ddubrava commentedon Aug 22, 2023
In my case, I can't even run scripts in the nested workspaces; npm says "no workspaces," although they are listed.
{ "name": "@moon/monorepo", "workspaces": [ "front" ], "scripts": { "build": "npm run -w front build" } }front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
front: wire up osrd-ui to osrd front build
ferferga commentedon Jul 8, 2025
@wraithgar Sorry for the ping, but can this get assigned a priority please? It's the 11th most thumbed up issue and it looks like this is getting completely forgotten.
PS: There are other issues with more upvotes than this one that are also labeled as "Needs triage"
ferferga commentedon Mar 19, 2026
@wraithgar @owlstronaut Please, at this point is almost mandatory to switch to pnpm due to the lacking support that npm gives to workspace setups.