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

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

问题描述

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

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

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

Manually trying to upgrade cli first also fails.

ng update @angular/cli

您的全局Angular CLI版本(8.0.1)大于您的本地Angular CLI版本 版本(7.3.9).使用本地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.

"@angular/compiler-cli"与"typescript" (requires ">=3.1.1 <3.3", would install "3.4.5")具有不兼容的对等项依赖关系. 发现不兼容的对等项依赖关系.见上文.

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.

推荐答案

如果无法使用ng update --all --force升级所有软件包,请尝试升级核心和CLI ng update @angular/core @angular/cli.

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.

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

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

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

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