chartjs-plugin-piechart-outlabels icon indicating copy to clipboard operation
chartjs-plugin-piechart-outlabels copied to clipboard

Not compatible with Version >3 of ChartJS

Open advissor opened this issue 1 year ago • 1 comments

Not compatible with Version >3 of ChartJS

RR! Found: [email protected]
npm ERR! node_modules/chart.js

npm ERR! Could not resolve dependency:

npm ERR! **peer chart.js@">= 2.7.0 < 3"** from [email protected]
npm ERR! node_modules/chartjs-plugin-piechart-outlabels

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.

advissor avatar Apr 16 '23 11:04 advissor

import PieChartOutLabels from 'chartjs-plugin-piechart-outlabels'; generates error:

TS7016: Could not find a declaration file for module 'chartjs-plugin-piechart-outlabels'. 'C:/project/node_modules/chartjs-plugin-piechart-outlabels/dist/chartjs-plugin-piechart-outlabels.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/chartjs-plugin-piechart-outlabels` if it exists or add a new declaration (.d.ts) file containing `declare module 'chartjs-plugin-piechart-outlabels';`

After created a typings folder, added chartjs-plugin-piechart-outlabels.d.ts with content: declare module 'chartjs-plugin-piechart-outlabels';

Made sure tsconfig.app.json has "include": ["src/**/*.d.ts"].

Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'merge')
TypeError: Cannot read properties of undefined (reading 'merge')
at chartjs-plugin-piechart-outlabels.js:22:25
at chartjs-plugin-piechart-outlabels.js:11:65
at 2818 (chartjs-plugin-piechart-outlabels.js:10:2)

hjk2022 avatar Jun 09 '23 18:06 hjk2022