[BUG] workspaces dependencies should take precedence over root transitional dependencies when deduping at the root. #4437
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Converting an existing angular (peer dependency on rxjs@6||7) project with
rxjs@7
to monorepository and with concurrently (containsrxjs@6
dependency) at root will make npm install@angular/*
peer withrxjs@6
instead ofrxjs@7
at the root.The problem appeared when upgrading to v8.5.0 jhipster/generator-jhipster#17846.
We generate a few independent projects and use the workspace root only for integration scripts (not possible with v8.5.0 anymore due to #4372, now a npm install at a workspace will be applied to the entire monorepository).
The workaround is to add a not required
rxjs@7
at the root.Expected Behavior
package1
rxjs@7
dependency should be moved to the root with@angular/core
.Steps To Reproduce
root
package.json
:package1/package.json
:npm ls
:workspaces@ /Users/mshima/git/workspaces ├── concurrently@7.0.0 └─┬ package1@ -> ./package1 ├── @angular/core@13.2.3 └── rxjs@7.5.4
At root directory:
Environment
The text was updated successfully, but these errors were encountered: