ERROR Error: Uncaught (in promise): TypeError: chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables is not iterable (cannot read property undefined) TypeError: chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables is not iterable (cannot read property undefined) at 16667 (ng2-charts.mjs:253:7)

I have recently upgraded to Angular 16 and I was using previously "ng2-charts": "2.4.2" and now upgraded it to v5.0.3. and facing this above error.

Error

To Solve this error,

  1. Deleted Node modules and package-lock.json files and folder and reintalled it. Nothing impacted. Still getting same error.
  2. downgraded the version of ng2-charts but still getting same error.
1

There are 1 answers

0
Moacyr Pinheiro On

Upgrading chart.js e ng2-charts worked for me on Angular 17

npm i chart.js@latest
npm i ng2-charts@latest