当尝试在 Angular 11 中更新最新的 ngrx/store 时,它会发出安装 Angular 10 的警告。
@ngrx/store@10.1.2 需要 @angular/core@^10.0.0 的对等点,但没有安装。您必须自己安装对等依赖项。
以下是包json
"dependencies": {
"@angular/animations": "^11.0.5",
"@angular/cdk": "^11.0.3",
"@angular/common": "^11.0.5",
"@angular/compiler": "^11.0.5",
"@angular/core": "^11.0.5",
"@angular/forms": "^11.0.5",
"@angular/material": "^11.0.3",
"@angular/material-moment-adapter": "^11.0.3",
"@angular/platform-browser": "^11.0.5",
"@angular/platform-browser-dynamic": "^11.0.5",
"@angular/router": "^11.0.5",
"@fortawesome/fontawesome-free": "^5.15.1",
"@ngrx/store": "^10.1.2",
"@popperjs/core": "^2.6.0",
"bootstrap": "^4.5.3",
"classlist.js": "1.1.20150312",
"core-js": "^3.8.1",
"jquery": "^3.5.1",
"moment": "^2.29.1",
"oidc-client": "^1.10.1",
"popper.js": "^1.16.1",
"rxjs": "~6.6.3",
"sass-loader": "~6.0.7",
"tslib": "^2.0.3",
"web-animations-js": "^2.3.2",
"zone.js": "^0.10.3"
}
npm install 给出以下警告
npm WARN @ngrx/store@10.1.2 requires a peer of @angular/core@^10.0.0 but none is installed. You must install peer dependencies yourself.
如何处理这种情况?