【问题标题】:Upgrade Angular 4 to 10: Error cannot update safely because packages have conflicting dependencies将 Angular 4 升级到 10:错误无法安全更新,因为包具有冲突的依赖项
【发布时间】:2021-01-06 15:53:13
【问题描述】:

我是升级 angular 平台的新手,并尝试将 angular 从 4 升级到 10,并按照 angular 官方页面中给出的说明进行操作

https://update.angular.io/?v=4.4-10.0

目前,由于此错误,我一直无法将其升级到 Angular 6:

Error: Cannot update safely because packages have conflicting dependencies. Package @angular/core would need to match both versions "7.2.16" and "10.1.2, which are not compatible.
Cannot update safely because packages have conflicting dependencies. Package @angular/core would need to match both versions "7.2.16" and "10.1.2, which are not compatible.

有人对此有解决方案吗?

我已尝试浏览此错误,但找不到适合我的问题的错误

【问题讨论】:

  • 你可能应该通过每个主要版本慢慢更新你的 Angular 项目,而不是直接从 v4 更新到 v10。

标签: angular angular10


【解决方案1】:

我会说你有一些依赖于@angular/core 版本的包。我要做的是在您的node_modules 文件夹中搜索与7.2.1610.1.2 匹配的内容,看看是否有任何内容将“@angular/core”列为依赖项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-25
    • 2018-01-19
    • 2016-07-29
    • 2015-03-26
    • 2021-11-12
    • 2021-09-03
    相关资源
    最近更新 更多