使用ng update命令将角度更新为最新版本。不断遇到同伴依赖性问题。
我尝试使用--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.
答案 0 :(得分:0)
请检查以下内容: Upgrade to Angular 9
您可以按照以下步骤直接从Angular 8升级到10。
如果这不起作用,请先升级到Angular 9,然后使用相同的策略从Angular 9升级到10。
如果那行不通,我会说创建一个全新的Angular 10应用并逐个迁移组件。如果是中型应用程序,则时间不会超过4个小时。本练习还将帮助您清理一些不必要的代码。看一下这个: Upgrade from Angular 4 to 8
希望这会有所帮助。