【问题标题】:Update angular 8 to 10 using cli使用 cli 将角度 8 更新为 10
【发布时间】:2020-12-20 09:14:54
【问题描述】:

使用 ng update 命令将 angular 更新到最新版本。不断遇到对等依赖问题。

我尝试使用 --force 命令,但是有很多不同的问题

                  Package "@angular-redux/form" has an incompatible peer dependency to "@angular/core" (requires "^6.0.0" (extended), would install "10.0.14").
                  Package "tsickle" has an incompatible peer dependency to "typescript" (requires "~3.8.2", would install "3.9.7")
                  Package "@angular-redux/form" has an incompatible peer dependency to "@angular/common" (requires "^6.0.0" (extended), would install "10.0.14").
                  Package "@angular-redux/form" has an incompatible peer dependency to "@angular/compiler" (requires "^6.0.0" (extended), would install "10.0.14").
                  Package "@angular-redux/form" has an incompatible peer dependency to "@angular/forms" (requires "^6.0.0" (extended), would install "10.0.14").
                  Package "@swimlane/ngx-datatable" has an incompatible peer dependency to "@angular/platform-browser" (requires "<9.0.0" (extended), would install "10.0.14").
                  Package "@angular-redux/router" has an incompatible peer dependency to "@angular/router" (requires "^6.0.3" (extended), would install "10.0.14").
                  Package "tsickle" has an incompatible peer dependency to "typescript" (requires "~3.8.2", would install "3.9.7").


✖ Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
  See "/private/var/folders/dh/r0v3cpq168x9bjxp1mjrrgxw0000gn/T/ng-nxMhiB/angular-errors.log" for further details.

参考 - https://update.angular.io/

【问题讨论】:

    标签: angular angular-cli angular8 angular10 angular-upgrade


    【解决方案1】:

    请查看: Upgrade to Angular 9

    您可以按照这个直接从 Angular 8 升级到 10。

    如果这不起作用,请先升级到 Angular 9,然后使用相同的策略从 Angular 9 升级到 10。

    如果这不起作用,我会说创建全新的 Angular 10 应用程序并逐个迁移组件。如果是中型应用程序,则不应超过 4 小时。这个练习也将帮助你清理一些不必要的代码。看一下这个: Upgrade from Angular 4 to 8

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-13
      • 1970-01-01
      • 2019-11-16
      • 2017-11-18
      • 1970-01-01
      • 2019-11-16
      • 2023-01-20
      • 2020-05-03
      相关资源
      最近更新 更多