尝试安装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错误!此运行的完整日志位于:系统提示:如果您的系统发生错误,请登录!
1条答案
按热度按时间thtygnil1#
You can check peer dependencies for
angular-highcharts
as below.Result:
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:
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.