Body
Hi, thanks for the great plugin!
There seems to be a discrepancy between the README and the published package.json which leads to a peer dependency conflict on npm 7+ / 10.
What I did
- Create a minimal project:
// package.json
{
"private": true,
"name": "repro-outlabels-peer",
"version": "0.0.0",
"dependencies": {
"chart.js": "3.9.1",
"@energiency/chartjs-plugin-piechart-outlabels": "1.3.5"
}
}
- Run install
- Installation fails with a peer dependency resolution error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: repro-outlabels-peer@0.0.0
npm ERR! Found: chart.js@3.9.1
npm ERR! node_modules/chart.js
npm ERR! chart.js@"3.9.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer chart.js@"> 3" from @energiency/chartjs-plugin-piechart-outlabels@1.3.5
npm ERR! node_modules/@energiency/chartjs-plugin-piechart-outlabels
npm ERR! @energiency/chartjs-plugin-piechart-outlabels@"1.3.5" from the root project
Why this is confusing
- README says the plugin “requires Chart.js 3.0.0 or later” (i.e. >= 3.0.0).
- package.json has:
{
"peerDependencies": {
"chart.js": "> 3"
}
}
In theory, > 3 should mean “greater than 3.0.0” and thus include 3.0.1–3.x and 4.x.
However, with npm 7+/10’s strict peer resolution, this range appears to be treated as incompatible with 3.9.1, producing ERESOLVE.
So users following the README and installing Chart.js 3.x run into an error.
Proposed fix
- If 3.x is intended to be supported: change the peer range to
"peerDependencies": {
"chart.js": ">= 3.0.0"
}
(or at least ">= 3.0.0"), and keep the README as-is.
- If 4.x+ only is intended:
"peerDependencies": {
"chart.js": ">= 4"
}
and update the README to say “Chart.js 4.0.0 or later”.
Happy to open a PR once the intended support window is confirmed. Thanks!
Body
Hi, thanks for the great plugin!
There seems to be a discrepancy between the README and the published package.json which leads to a peer dependency conflict on npm 7+ / 10.
What I did
Why this is confusing
In theory, > 3 should mean “greater than 3.0.0” and thus include 3.0.1–3.x and 4.x.
However, with npm 7+/10’s strict peer resolution, this range appears to be treated as incompatible with 3.9.1, producing ERESOLVE.
So users following the README and installing Chart.js 3.x run into an error.
Proposed fix
(or at least ">= 3.0.0"), and keep the README as-is.
and update the README to say “Chart.js 4.0.0 or later”.
Happy to open a PR once the intended support window is confirmed. Thanks!