i want to add ng-bootstrap but ERESOLVE faced me each time i try to add it :
ng add @ng-bootstrap/ng-bootstrap --legacy-peer-deps
ℹ Using package manager: npm
⚠ Unable to find compatible package. Using 'latest' tag.
⚠ Package has unmet peer dependencies. Adding the package may not succeed.
The package @ng-bootstrap/[email protected] will be installed and executed.
Would you like to proceed? Yes
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/common
npm ERR! @angular/common@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.0.0" from @ng-bootstrap/[email protected]
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! @ng-bootstrap/ng-bootstrap@"12.1.2" 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 /home/Coding/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/Coding/.npm/_logs/2022-07-03T12_48_18_862Z-debug-0.log
✖ Packages installation failed, see above.
the output of ng version is below :
Angular CLI: 14.0.4
Node: 16.15.1
Package Manager: npm 8.11.0
OS: linux x64
Angular: 14.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.4
@angular-devkit/build-angular 14.0.4
@angular-devkit/core 14.0.4
@angular-devkit/schematics 14.0.4
@schematics/angular 14.0.4
rxjs 7.5.5
typescript 4.7.4
here are all the infos about my system nodejs and angular itself . i've fight this problem for about 10 hours without any results , please help !!!
CodePudding user response:
Did you by any chance tried the same command with the --force
flag? This usually does the trick.
CodePudding user response:
You're not alone on the island. This seems to be a known issue:
https://github.com/ng-bootstrap/ng-bootstrap/issues/4340
Sounds like you might need to use Angular 13 until this gets patched.