Home > Software design >  How to resolve dependency conflict while installing Bootstrap using Angular CLI command?
How to resolve dependency conflict while installing Bootstrap using Angular CLI command?

Time:06-11

I tried to install Bootstrap in my Angular application by using the CLI command: ng add @ng-bootstrap/ng-bootstrap. But I got the following errors in return. How to resolve these dependency conflict while installing Bootstrap using Angular CLI command? enter image description here

CodePudding user response:

Your problem is due to an upstream version dependency conflict where @ng-bootstrap/[email protected] (upstream) is expecting @angular/common@^13.0.0 (downstream).

Either update your Angular project to ^13.0.0 or accept a potentially broken dependency resolution using the --force switch.

ng add @ng-bootstrap/ng-bootstrap --force

Or install an older version of @ng-bootstrap/ng-bootstrap that does not cause an upstream dependency issue with the Angular version you are using.

Also check this Fix the upstream dependency conflict while installing ng-bootstrap/ng-bootstrap

  • Related