angular-highcharts unable to resolve dependency tree peer @angular/common@"^13.0.0" from [email protected]

890 views Asked by At

Trying to install angular-highcharts to my angular project but I m getting the error below:

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

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^13.0.0" from [email protected] 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.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\YUNUS\AppData\Local\npm-cache_logs\2022-07-25T13_43_51_090Z-debug-0.log

1

There are 1 answers

0
Robin Webb On

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/[email protected] 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.