当我运行 ng update @ angular / core 时,出现以下错误:
Package "@angular/animation" has an incompatible peer dependency to
"@angular/core" (requires "4.0.0-beta.8" (extended), would install "7.0.0").
我能够毫无问题地运行ng update @angular/cli
我已经跑过npm update
这是我的ng版本:
Angular CLI: 7.0.2
Node: 8.12.0
OS: win32 x64
Angular: 6.1.10
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.10.2
@angular-devkit/build-angular 0.10.2
@angular-devkit/build-optimizer 0.10.2
@angular-devkit/build-webpack 0.10.2
@angular-devkit/core 7.0.2
@angular-devkit/schematics 7.0.2
@angular/animation 4.0.0-beta.8
@angular/cdk 6.4.7
@angular/cli 7.0.2
@angular/material 6.4.7
@ngtools/webpack 7.0.2
@schematics/angular 7.0.2
@schematics/update 0.10.2
rxjs 6.2.2
typescript 2.9.2
webpack 4.19.1
答案 0 :(得分:2)
以下将解决问题:
要强制更新,请添加 --force
标志。
ng update @angular/core --force