gpt4 book ai didi

angular - 在 angular 11 中安装 ng-bootstrap 时出错

转载 作者:行者123 更新时间:2023-12-04 16:25:24 27 4
gpt4 key购买 nike

我已经安装了 angular cli 的版本 (11),并且在安装 ng-bootstrap 时收到以下错误消息。任何人都可以帮我解决这个问题吗?

SeshagiiRaosMBP:trx-mngmt-ui-10 Munuma$ ng add @ng-bootstrap/ng-bootstrap
Unable to find compatible package. Using 'latest'.
Package has unmet peer dependencies. Adding the package may not succeed.
Installing packages for tooling via npm.
An unhandled exception occurred: npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: trx-mngmt-ui@0.0.0
npm ERR! Found: @angular/core@11.0.5
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~11.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"10.0.14" from @angular/common@10.0.14
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~10.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 /Users/Munuma/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Munuma/.npm/_logs/2020-12-29T14_49_36_751Z-debug.log
Package install failed, see above.
See "/private/var/folders/m1/g43nd64x54qdm_94_wk1sc7m0000gn/T/ng-fL8ZaZ/angular-errors.log" for further details.

最佳答案

运行 npm i @ng-bootstrap/ng-bootstrap --legacy-peer-deps解决了这个问题

关于angular - 在 angular 11 中安装 ng-bootstrap 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65494155/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com