Angular 17.0.6 issue with ng-bootstrap 16 heeeeeelp

301 views Asked by At

I am trying to install ng-bootstrap 16 in the cli and I have already try to add directly to the dependecies "@ng-bootstrap/ng-bootstrap":"16.0.0" and then execute "npm install" but was useless because always give me the next error:

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR!
peer @angular/core@"17.0.6" from @angular/[email protected] npm ERR!
node_modules/@angular/animations npm ERR! peerOptional @angular/animations@"17.0.6" from @angular/[email protected] npm ERR! node_modules/@angular/platform-browser npm ERR! peer @angular/platform-browser@"17.0.6" from @angular/[email protected] npm ERR! node_modules/@angular/forms npm ERR! @angular/forms@"^17.0.0" from the root project npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project) npm ERR! @angular/animations@"^17.0.0" from the root project npm ERR! peer @angular/core@"17.0.6" from @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! peer @angular/common@"17.0.6" from @angular/[email protected] npm ERR!
node_modules/@angular/forms npm ERR! @angular/forms@"^17.0.0" from the root project npm ERR! peer @angular/common@"17.0.6" from @angular/[email protected] npm ERR!
node_modules/@angular/platform-browser npm ERR! peer @angular/platform-browser@"17.0.6" from @angular/[email protected] npm ERR! node_modules/@angular/forms npm ERR! @angular/forms@"^17.0.0" from the root project npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project) npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project) npm ERR! 6 more (@angular/compiler, @angular/forms, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! @ng-bootstrap/ng-bootstrap@"16.0.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR!
peer @angular/core@"17.1.1" from @angular/[email protected] npm ERR!
node_modules/@angular/forms npm ERR! @angular/forms@"^17.0.0" from the root project npm ERR! peer @angular/forms@"^17.0.0" from @ng-bootstrap/[email protected] npm ERR!
node_modules/@ng-bootstrap/ng-bootstrap npm ERR!
@ng-bootstrap/ng-bootstrap@"16.0.0" 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.

as I said I have already try to clean the cache and to write directly into the dependencies and then execute the npm install command, but did not work I only wanna use the typeahead in my project :(

1

There are 1 answers

0
Xavi On

Try something like this:

  • ng add @angular/localize
  • npm i @popperjs/core
  • npm i @ng-bootstrap/ng-bootstrap
  • ng add @ng-bootstrap/ng-bootstrap