簡體   English   中英

使用 cli 將 angular 8 更新為 10

[英]Update angular 8 to 10 using cli

使用 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 9

您可以按照此直接從 Angular 8 升級到 10。

如果這不起作用,請先升級到 Angular 9,然后使用相同的策略從 Angular 9 升級到 10。

如果這不起作用,我會說創建全新的 Angular 10 應用程序並逐個遷移組件。 如果是中等大小的應用程序,則不應超過 4 小時。 這個練習也將幫助你清理一些不必要的代碼。 看看這個:從 Angular 4 升級到 8

希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM