我正在尝试安装npm install --保存@ng-bootstrap/ng-bootstrap得到以下错误。请帮助我解决这个问题。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: bidashboard@0.0.0
npm ERR! Found: @angular/compiler@13.1.3
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/localize@13.2.3
npm ERR! node_modules/@angular/localize
npm ERR! peer @angular/localize@"^13.0.0" from @ng-bootstrap/ng-bootstrap@12.0.0
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
2条答案
按热度按时间lsmd5eda1#
一个已知的bug,你可以在这里观察它:https://github.com/angular/angular-cli/issues/22333
正如他们提到的,你可以:
1.更新
npm install --save --legacy-peer-deps
1.设置yarn为默认包管理器。指令https://codinglatte.com/posts/angular/setup-angular-touse-yarn-package-manager
已更新
它帮助我将库升级到版本13。1.2
ng update @angular/core
axr492tv2#
运行此命令
npm install --save --legacy-peer-deps