ng upgrade命令无法将cli从v7升级到v8 [英] ng upgrade command fails for upgrading cli from v7 to 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屋!