Closed sydneyhenrard closed 11 months ago
I have the same issue
Same error here. I'm unable to install any of the v5 versions:
$ npm i --save ng2-charts npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: ng2-charts@5.0.1 npm WARN Found: ng2-charts-schematics@undefined npm WARN node_modules/ng2-charts-schematics npm WARN npm WARN Could not resolve dependency: npm WARN peer ng2-charts-schematics@"0.0.1" from ng2-charts@5.0.1 npm WARN node_modules/ng2-charts npm WARN ng2-charts@"*" from the root project
Same issue.
I tried to install it on a blank project and the schematic install version 4 instead of 5. But it worked. It worth nothing to say that the schematic is not compatible with standalone project.
I'm not sure about the build/npm publish process that's used for this project, but the issue is that the schematic package.json references a version that doesn't exist on npm.
When the ng2-charts lib is built, nx automatically generates the dependencies in the package.json using that version number, but it doesn't exist on npm. I imagine updating the schematics version to one that does exist in npm would fix this.
In the meantime, you should be able to fix this in your own project by adding this to your package.json:
"overrides": {
"ng2-charts": {
"ng2-charts-schematics": "0.1.7"
}
}
having same issue here.
seems like the ng2-charts-schematics
is required.
Also, when using ng add ng2-charts
, it installs chart.js
v3.6.0 instead of v4
Thumbs up
same here
same problem
same problem 🙂
Same here. Do you need support or funding to handle this asap. It is a show blocker for me :(
Same Problem here.
Sorry, I have not seen @wjehring solution ;)
Same problem
I'm not sure, if it is the same, but today, during the ng add ng2-charts
I got the follwing:
Collection "/private/tmp/testable/node_modules/ng2-charts/schematics/src/collection.json" cannot be resolved.
It is complete new project, just created with ng new
command, the Angular version 16.2.0
.
Thank you @wjehring !
Sounds like people are getting round this issue with the package.json overrides.
If you see any complaints during dependency installation due to @angular/platform-browser
then you may also need to add this override.
This should be fixed in 5.0.3
I migrated from Angular 15.2.0 to Angular 16.1.6 and tried to upgrade from
ng2-charts
4.1.1 to 5.0.1. I got this error due tong2-charts-schematics
when runningnpm install
.package.json