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

Not compatible with Version >3 of ChartJS #32

Open
advissor opened this issue Apr 16, 2023 · 1 comment
Open

Not compatible with Version >3 of ChartJS #32

advissor opened this issue Apr 16, 2023 · 1 comment

Comments

@advissor
Copy link

Not compatible with Version >3 of ChartJS

RR! Found: chart.js@4.2.1
npm ERR! node_modules/chart.js

npm ERR! Could not resolve dependency:

npm ERR! **peer chart.js@">= 2.7.0 < 3"** from chartjs-plugin-piechart-outlabels@0.1.4
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.
@hjk2022
Copy link

hjk2022 commented Jun 9, 2023

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)

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