angular-highcharts无法从angular-highcharts@14.1.5解析相关性树对等项@angular/common@"^13.0.0”

6ljaweal  于 2022-11-10  发布在  Highcharts
关注(0)|答案(1)|浏览(161)

尝试安装angular-highcharts到我的Angular 项目,但我得到下面的错误:

PS C:\Users\YUNUS\Desktop\newProject\gos-panel\src\app\shared> npm i angular-highcharts highcharts

npm ERR!代码ERESOLVE npm ERR!ERESOLVE无法解析依赖关系树npm ERR!npm ERR!解析时:gos-panel@0.0.0 npm错误!找到:@Angular /公共@14.1.0 npm错误!节点模块/@Angular /公共npm错误!npm错误!无法解析相关性:npm ERR!peer @angular/common@"^13.0.0”来自angular-highcharts@14.1.5 npm ERR!node_modules/angular-highcharts npm ERR!angular-highcharts@"*”来自根项目npm ERR!npm ERR!修复上游依赖项冲突,或重试npm ERR!将此命令与--force、或--legacy-peer-deps npm ERR!以接受不正确的(可能已损坏的)依赖关系解析。npm ERR!npm ERR!有关完整报告,请参阅C:\Users\YUNUS\AppData\Local\npm-cache\eresolve-report.txt。
npm错误!此运行的完整日志位于:系统提示:如果您的系统发生错误,请登录!

thtygnil

thtygnil1#

You can check peer dependencies for angular-highcharts as below.

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.n.n.
You are using version @angular/common@14.1.0 it appears.
Please either install Angular 13 or work around the issue by using the command:

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, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

相关问题