从Angular 6升级到Angular 8时出现错误

3

我正在尝试将我的Angular 6.2.4 应用程序升级到 Angular 8.0.2。我按照angular.io上提供的步骤进行了升级,但是在输入 "ng update @angular/cli @angular/core" 命令时一直出现此错误。

Your global Angular CLI version (8.0.2) is greater than your local
version (6.2.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
                  Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "8.0.0").
                  Package "@angular/material-moment-adapter" has a missing peer dependency of "moment" @ "^2.18.1".
                  Package "@angular/http" has an incompatible peer dependency to "@angular/platform-browser" (requires "6.1.9" (extended), would install "8.0.0").
                  Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires "^6.1.0" (extended), would install "8.0.0").
                  Package "ngx-loading" has an incompatible peer dependency to "@angular/common" (requires "^6.0.0-rc.0 || ^6.0.0" (extended), would install "8.0.0").
                  Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "8.0.0").
Incompatible peer dependencies found. See above.

请帮忙升级我的应用程序。


可能是重复问题:全局 Angular CLI 版本高于本地版本 - Gimby
1个回答

1

您需要更新本地的Angular版本。 打开命令提示符,转到存放packages.json文件的文件夹,并输入: ng update @angular/cli


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接