【问题标题】:Upgrade angular application from 6 to 10 produces lots of errors after update将 Angular 应用程序从 6 升级到 10 更新后会产生很多错误
【发布时间】:2020-11-21 00:57:09
【问题描述】:

请建议升级我的应用程序的最佳方法,并分享如何解决这样的对等依赖问题:-

Package "ngx-chips" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0" (extended), would install "10.0.7").
Package "@ng-bootstrap/ng-bootstrap" has a missing peer dependency of "@angular/localize" @ "^10.0.0".
Package "@ng-idle/core" has an incompatible peer dependency to "@angular/common" (requires "^9.0.0", would install "10.0.7")
Package "@ng-idle/core" has an incompatible peer dependency to "@angular/core" (requires "^9.0.0", would install "10.0.7")
Package "@ng-idle/core" has an incompatible peer dependency to "tslib" (requires "^1.10.0", would install "2.0.0")
Package "@ng-idle/keepalive" has an incompatible peer dependency to "@angular/common" (requires "^9.0.0", would install "10.0.7")
Package "@ng-idle/keepalive" has an incompatible peer dependency to "@angular/core" (requires "^9.0.0", would install "10.0.7")
Package "@ng-idle/keepalive" has an incompatible peer dependency to "tslib" (requires "^1.10.0", would install "2.0.0")
Package "ng2-file-drop" has an incompatible peer dependency to "core-js" (requires "^2.4.1", would install "3.6.5").
Package "@ng-select/ng-select" has an incompatible peer dependency to "@angular/common" (requires ">=9.0.0 <10.0.0", would install "10.0.7")
Package "@ng-select/ng-select" has an incompatible peer dependency to "@angular/core" (requires ">=9.0.0 <10.0.0", would install "10.0.7")
Package "@ng-select/ng-select" has an incompatible peer dependency to "@angular/forms" (requires ">=9.0.0 <10.0.0", would install "10.0.7")
Package "ng-recaptcha" has an incompatible peer dependency to "@angular/core" (requires "^6.0.0 || ^7.0.0 || ^8.0.0", would install "10.0.7")
Package "copy-webpack-plugin" has a missing peer dependency of "webpack" @ "^4.37.0 || ^5.0.0".
Package "ngx-mask" has an incompatible peer dependency to "@angular/common" (requires "^9.1.0", would install "10.0.7")
Package "ngx-mask" has an incompatible peer dependency to "@angular/core" (requires "^9.1.0", would install "

【问题讨论】:

  • 欢迎来到 Stack Overflow!请访问help center,使用tour 了解内容和How to Ask。做一些研究,search for related topics on SO;如果您遇到困难,请发布您的尝试minimal reproducible example,并使用[&lt;&gt;] sn-p 编辑器记录输入和预期输出。
  • 这种大步我认为最好创建一个新的 Angular 项目,再次添加所有必需的库(可能您获得更新版本的库并复制 .src。小心 rxjs 和httpClient

标签: javascript angular version ng-upgrade angular-upgrade


【解决方案1】:

在升级 Angular 项目时,不建议跨多个主要版本进行迁移。我强烈建议您按照此处使用更新指南的步骤操作:https://update.angular.io/。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多