Yarn installs child dependency when there already is root dependency with matching version
Do you want to request a feature or report a bug? Bug
What is the current behavior? Yarn installs child dependency, yet there is root dependency with matching version
yarn list v1.2.1
├─ [email protected]
│ ├─ moment@>= 2.9.0
│ └─ [email protected]
└─ [email protected]
moment-timezone depends on moment@>=2.9.0, there already is [email protected], but Yarn still installs additional moment package with different version as child of moment-timezone
If the current behavior is a bug, please provide the steps to reproduce.
yarn add [email protected]
yarn add moment-timezone
What is the expected behavior? Yarn should not install [email protected]
Please mention your node.js, yarn and operating system version. Node 6.11.4 Yarn 1.2.1 Windows 10
We have the same problem with jquery:
yarn list --pattern jquery
yarn list v1.2.1
├─ [email protected]
│ └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 1.04s.
The jquery dependency in bootstrap-datepicker is defined as followed:
"dependencies": {
"jquery": ">=1.7.1 <4.0.0"
}
This results in double inclusion of jquery in our browserify process. :(
I'm experiencing the exact same issue with Moment. I noticed a similar issue for the root cause here #4686
This is not an issue in 1.1.0 - I have downgraded from 1.2.x because of this issue.