Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng2-charts v6 or v5 problem with angular 17 #1978

Open
isma1809 opened this issue Jun 18, 2024 · 2 comments
Open

ng2-charts v6 or v5 problem with angular 17 #1978

isma1809 opened this issue Jun 18, 2024 · 2 comments

Comments

@isma1809
Copy link

I tried to install ng2-charts in angular 17 as the instructions say but it gives me this error:

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@"^17.3.0" from the root project
npm ERR! peer @angular/common@">=17.0.0" from [email protected]
npm ERR! node_modules/ng2-charts
npm ERR! ng2-charts@"6.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^18.0.0 || ^19.0.0" from @angular/[email protected]
npm ERR! node_modules/@angular/cdk
npm ERR! peer @angular/cdk@">=17.0.0" from [email protected]
npm ERR! node_modules/ng2-charts
npm ERR! ng2-charts@"6.0.1" 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.

In the ng2-charts documentation it indicates that version 17 of Angular is compatible with version 6 and even 5 and both give me the same error

thanks for your time

@kamran3210
Copy link

adding
"@angular/cdk": "^17.0.0",
to my package.json dependencies seems to have fixed this

@isma1809
Copy link
Author

Thanks you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants