Am facing this issue while deploying the angular application Added the below package @ng-bootstrap/ng-bootstrap. So please do the needfull the rootcause of the issue caused.
22-Dec-2022 07:03:47 npm ERR! Could not resolve dependency:
22-Dec-2022 07:03:47 **npm ERR! peer @angular/common@"^12.0.0" from @ng-bootstrap/[email protected]**
22-Dec-2022 07:03:47 npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
22-Dec-2022 07:03:47 npm ERR! @ng-bootstrap/ng-bootstrap@"^10.0.0" from the root project
22-Dec-2022 07:03:47 npm ERR!
22-Dec-2022 07:03:47 npm ERR! Fix the upstream dependency conflict, or retry
22-Dec-2022 07:03:47 npm ERR! this command with --force, or --legacy-peer-deps
22-Dec-2022 07:03:47 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
22-Dec-2022 07:03:47 npm ERR!
22-Dec-2022 07:03:47 npm ERR! See /home/node/.npm/eresolve-report.txt for a full report.
22-Dec-2022 07:03:47
22-Dec-2022 07:03:47 npm ERR! A complete log of this run can be found in:
22-Dec-2022 07:03:47 npm ERR! /home/node/.npm/_logs/2022-12-22T12_03_44_868Z-debug-0.log
22-Dec-2022 07:03:47 The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code:
My angular version is
/ \ _ __ __ _ _ | | __ _ _ __ / | | | |
/ △ \ | ' \ / _ | | | | |/ _
| '| | | | | | |
/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
Angular CLI: 13.3.4
Node: 16.15.0
Package Manager: npm 8.16.0
OS: win32 x64
Angular: 13.3.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, material, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.4
@angular-devkit/build-angular 13.3.4
@angular-devkit/core 13.3.4
@angular-devkit/schematics 13.3.4
@angular/cli 13.3.4
@angular/http 7.2.16
@schematics/angular 13.3.4
rxjs 6.6.7
typescript 4.6.4
CodePudding user response:
Please take a look here, as this might help you resolve your issue. Looks like the same problem: Dependency error while trying to add another one in angular