I am trying to install npm install --save @ng-bootstrap/ng-bootstrap getting following error. Please help me to resolve this issue.
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/compiler npm ERR! @angular/compiler@"~13.1.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/compiler@"13.2.3" from @angular/[email protected] npm ERR! node_modules/@angular/localize npm ERR! peer @angular/localize@"^13.0.0" from @ng-bootstrap/[email protected] npm ERR! node_modules/@ng-bootstrap/ng-bootstrap npm ERR! @ng-bootstrap/ng-bootstrap@"^12.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. npm ERR! npm ERR! See C:\Users\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\AppData\Local\npm-cache_logs\2022-02-19T20_02_59_711Z-debug-0.log
CodePudding user response:
Run this command
install --save --legacy-peer-deps
CodePudding user response:
A known bug, you can observe it here: https://github.com/angular/angular-cli/issues/22333
As they mention, you can:
- Updated
npm install --save --legacy-peer-deps
- Set yarn as default package manager. Instruction
https://codinglatte.com/posts/angular/setup-angular-touse-yarn-package-manager/