[英]angular-highcharts unable to resolve dependency tree peer @angular/common@"^13.0.0" from angular-highcharts@14.1.5
Trying to install angular-highcharts to my angular project but I m getting the error below:尝试将 angular-highcharts 安装到我的 angular 项目,但我收到以下错误:
PS C:\Users\YUNUS\Desktop\newProject\gos-panel\src\app\shared> npm i angular-highcharts highcharts
npm ERR: code ERESOLVE npm ERR. npm 错误:代码 ERESOLVE npm 错误。 ERESOLVE unable to resolve dependency tree npm ERR.
ERESOLVE 无法解析依赖树 npm ERR。 npm ERR: While resolving.
npm ERR:正在解决。 gos-panel@0.0:0 npm ERR.
gos-panel@0.0:0 npm 错误。 Found.
成立。 @angular/common@14.1.0 npm ERR, node_modules/@angular/common npm ERR, npm ERR.
@angular/common@14.1.0 npm ERR,node_modules/@angular/common npm ERR,npm ERR。 Could not resolve dependency: npm ERR.
无法解决依赖关系:npm ERR。 peer @angular/common@"^13.0 0" from angular-highcharts@14 1 5 npm ERR node_modules/angular-highcharts npm ERR angular-highcharts@"*" from the root project npm ERR npm ERR Fix the upstream dependency conflict or retry npm ERR this command with --force or --legacy-peer-deps npm ERR to accept an incorrect (and potentially broken) dependency resolution npm ERR npm ERR See C \Users\YUNUS\AppData\Local\npm-cache\eresolve-report txt for a full report
peer @angular/common@"^13.0 0" from angular-highcharts@14 1 5 npm ERR node_modules/angular-highcharts npm ERR angular-highcharts@"*" from the root project npm ERR npm ERR Fix the upstream dependency conflict or retry npm ERR this command with --force or --legacy-peer-deps npm ERR to accept an incorrect (and potentially broken) dependency resolution npm ERR npm ERR See C \Users\YUNUS\AppData\Local\npm-cache\eresolve-报告 txt 以获得完整报告
npm ERR: A complete log of this run can be found in: npm ERR. npm ERR:此运行的完整日志可在以下位置找到:npm ERR。 C \Users\YUNUS\AppData\Local\npm-cache_logs\2022-07-25T13_43_51_090Z-debug-0 log
C \Users\YUNUS\AppData\Local\npm-cache_logs\2022-07-25T13_43_51_090Z-debug-0 日志
You can check peer dependencies for angular-highcharts
as below.您可以检查
angular-highcharts
的对等依赖项,如下所示。
npm info angular-highcharts peerDependencies
Result:结果:
'@angular/common': '^13.0.0', '@angular/core': '^13.0.0' }
Note that angular-highcharts
requires @angular/common
and @angular/core
version 13.nn请注意,
angular-highcharts
需要@angular/common
和@angular/core
版本 13.nn
You are using version @angular/common@14.1.0
it appears.您正在使用它出现的版本
@angular/common@14.1.0
。
Please either install Angular 13 or work around the issue by using the command:请安装 Angular 13 或使用以下命令解决此问题:
npm i angular-highcharts highcharts --legacy-peer-deps
As per the error above though, this peer dependency hasn't necessarily been tested.不过,根据上面的错误,这种对等依赖关系不一定经过测试。
Fix the upstream dependency conflict, or retry npm ERR, this command with --force.
修复上游依赖冲突,或者重试npm ERR,这个命令加上--force。 or --legacy-peer-deps npm ERR to accept an incorrect (and potentially broken) dependency resolution
或 --legacy-peer-deps npm ERR 接受不正确(且可能损坏)的依赖解析
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.