从 NG 12 -> 16 升级并且“@ng-bootstrap/ng-bootstrap 获取:包“@ng-bootstrap/ng-bootstrap”具有不兼容的对等依赖项

问题描述 投票:0回答:1

从 12 -> 13(最终 13)时。每https://update.angular.io/?v=12.0-13.0

ng更新@angular/core@13 @angular/cli@13

出现依赖错误:

  •              Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/common" (requires "^11.0.0" (extended), would install "13.4.0").
                Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/core" (requires "^11.0.0" (extended), would install "13.4.0").
                Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires "^11.0.0" (extended), would install "13.4.0").
                Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/localize" (requires "^11.0.0" (extended), would install "13.4.0").
                Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "rxjs" (requires "^6.5.5", would install "7.8.1").
    

我们查看了依赖关系表:https://www.npmjs.com/package/@ng-bootstrap/ng-bootstrap#demo

并升级到^14.1.0,这产生了更多错误。推荐的方法是什么?正在考虑从我们的 package.json 中删除 @ng-bootstrap/ng-bootstrap 并手动升级,因为维护者似乎不支持同行部门的升级步骤。

angular ng-bootstrap ng
1个回答
0
投票

我遇到了同样的错误。我基本上可以通过执行以下操作将 Angular 12 升级到 13:

  1. 卸载@ng-bootstrap/ng-bootstrap

    npm uninstall @ng-bootstrap/ng-bootstrap

  2. 更新到 Angular 13

    npm run ng update @angular/core@13 @angular/cli@13

  3. 重新安装与 Angular 13 兼容的 ng-bootstrap 版本。

    npm i @ng-bootstrap/[email protected]

© www.soinside.com 2019 - 2024. All rights reserved.