You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was updating angular from v14 to v17 and thus ng2-charts from v2.4.2 to v6.0.1 and chartjs from v2.9.4 to v3.9.1 on my project and i kept having the following error:
Error: node_modules/ng2-charts/lib/ng-charts.provider.d.ts:3:29 - error TS2307: Cannot find module 'chart.js/dist/types/utils' or its corresponding type declarations.
3 import { DeepPartial } from 'chart.js/dist/types/utils';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
✖ Failed to compile.
I guess "ng2-charts": "^6.0.1" does only support chartjs v4, but this migration is not yet possible for me. 😢
Application bundle generation failed. [6.013 seconds]
✘ [ERROR] TS2307: Cannot find module 'chart.js/dist/types/utils' or its corresponding type declarations. [plugin angular-compiler]
../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_@angular+pla_jqs4iodj7gs6carqputrxejine/node_modules/ng2-charts/lib/ng-charts.provider.d.ts:3:28:
3 │ import { DeepPartial } from 'chart.js/dist/types/utils';
As this is a typescript error regarding not finding a type definition a possible temporary solution would be to disable LibChecking in tsconfig.json file via:
Hi! 👋
Firstly, thanks for your work on this project!
I was updating angular from
v14
tov17
and thusng2-charts
fromv2.4.2
tov6.0.1
andchartjs
fromv2.9.4
tov3.9.1
on my project and i kept having the following error:I guess
"ng2-charts": "^6.0.1"
does only supportchartjs v4
, but this migration is not yet possible for me. 😢To fix my issue, I used patch-package to patch
[email protected]
.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: