Skip to content

[BUG] peer-dependency conflict when having "greater than or equal to" range >= #2553

Closed
npm/arborist
#266
@talsi

Description

@talsi

Current Behavior:

conflict error when peer-dependency has >= range. looks like it tries to install the highest version possible instead of being loose and choose a satisfying version.

  • @angular-slider/ngx-slider@2.0.3 has peer-dependency of @angular/common: >=6.1.0
  • @angular/forms@10.2.4 has peer-dependency of @angular/common: 10.2.4.
  • @angular/common@10.2.4 seems to satisfy the both requirements yet it fails

Expected Behavior:

successful install, choosing compatible version.

Steps To Reproduce:

run npm i @angular/forms@^10.2.4 @angular-slider/ngx-slider@^2.0.3

Result

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: untitled36@1.0.0
npm ERR! Found: @angular/common@11.1.0
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@">=6.1.0" from @angular-slider/ngx-slider@2.0.3
npm ERR!   node_modules/@angular-slider/ngx-slider
npm ERR!     @angular-slider/ngx-slider@"2.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"10.2.4" from @angular/forms@10.2.4
npm ERR! node_modules/@angular/forms
npm ERR!   @angular/forms@"10.2.4" from the root project
npm ERR!   peer @angular/forms@">=6.1.0" from @angular-slider/ngx-slider@2.0.3
npm ERR!   node_modules/@angular-slider/ngx-slider
npm ERR!     @angular-slider/ngx-slider@"2.0.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Environment:

node: 15.6.0
npm: 7.4.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions