我尝试使用--force,但没有用。
错误代码-
Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/common" (requires "^7.0.0" (extended), would install "9.1.9").
Package "@swimlane/ngx-charts" has an incompatible peer dependency to "@angular/animations" (requires "6.x" (extended), would install "9.1.9").
Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <8.0.0 || >7.0.0-beta <8.0.0" (extended), would install "9.1.9").
Package "@swimlane/ngx-charts" has an incompatible peer dependency to "@angular/platform-browser" (requires "6.x" (extended), would install "9.1.9").
Package "@swimlane/ngx-charts" has an incompatible peer dependency to "@angular/platform-browser-dynamic" (requires "^6.0.0" (extended), would install "9.1.9").
Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires "^7.0.0" (extended), would install "9.1.9").
Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <8.0.0 || >7.0.0-beta <8.0.0" (extended), would install "9.1.9").
Package "ngx-jsoneditor" has an incompatible peer dependency to "rxjs" (requires "^5.1.0", would install "6.5.5").
Package "ngx-jsoneditor" has an incompatible peer dependency to "zone.js" (requires "^0.8.4", would install "0.10.3").
您需要安装每个依赖项的兼容版本,这是该代码的代码
npm i --save dependencyName@version
希望尝试以下命令,它将得到修复
ng update @angular/cli @angular/core
尝试添加force flag
ng update @angular/core --force