ng upgrade 命令无法将 cli 从 v7 升级到 v8 [英] ng upgrade command fails for upgrading cli from v7 to v8

查看:46
本文介绍了ng upgrade 命令无法将 cli 从 v7 升级到 v8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于将 cli 版本从 v7 项目更新到 v8 的 ng upgrade 命令失败.

手动尝试先升级 cli 也会失败.

ng 更新@angular/cli

<块引用>

您的全局 Angular CLI 版本 (8.0.1) 高于您本地的版本 (7.3.9).使用本地 Angular CLI 版本.

Package "@angular/compiler-cli"typescript"具有不兼容的对等依赖关系(需要>=3.1.1 <3.3",会安装"3.4.5").发现不兼容的对等依赖项.见上文.

解决方案

尝试使用 ng update --all --force 升级所有包,如果这不起作用,则尝试升级核心和 CLI <代码>ng 更新@angular/core @angular/cli.

仍然无法正常工作,然后使用 npm i typescript@3.4

手动安装 typescript

The ng upgrade command for updating cli version from a v7 project to v8 fails.

Manually trying to upgrade cli first also fails.

ng update @angular/cli

Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used.

Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5"). Incompatible peer dependencies found. See above.

解决方案

try upgrading all packages using ng update --all --force if this doesn't work then try upgrading core and CLI ng update @angular/core @angular/cli.

and still not working then install typescript manually using npm i typescript@3.4

这篇关于ng upgrade 命令无法将 cli 从 v7 升级到 v8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆