Vinoth Karuppusamy
Vinoth Karuppusamy

Reputation: 21

"Unable to install [email protected] with Angular 15 due to dependency conflict"

I am working on an Angular project with version 15.2.10, and I need to install the ng-apexcharts library, specifically version 1.7.6, to use ApexCharts in my application.

The Problem When I try to install [email protected] using npm, I encounter a dependency conflict error.

The Error Message

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! @angular/common@"^15.2.10" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^19.0.0" from [email protected] npm ERR! node_modules/ng-apexcharts npm ERR! ng-apexcharts@"^1.7.7" 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.

I attempted to install the package using --force or --legacy-peer-deps, but I’m concerned about potential issues with this approach.

Verified the compatibility of Angular and ng-apexcharts versions in their respective documentation.

Tried locking ng-apexcharts to version 1.7.6, but it still raises a similar error.

I want to install [email protected] and use it in my Angular 15 project without dependency conflicts.

Environment Angular CLI: 15.2.11 Node: 18.10.0 Package Manager: npm 8.19.2

Upvotes: 1

Views: 359

Answers (0)

Related Questions