reactchartjs / react-chartjs-2

React components for Chart.js, the most popular charting library
https://react-chartjs-2.js.org
MIT License
6.64k stars 2.37k forks source link

[Bug]: using <Chart> in production builds has a chart type error #1199

Open glend1 opened 1 year ago

glend1 commented 1 year ago

Would you like to work on a fix?

Current and expected behavior

the chart fails to render on production builds it gives an error that says the chart type isn't registered. however it passes typescript checking.

Reproduction

https://codesandbox.io/s/github/reactchartjs/react-chartjs-2/tree/master/sandboxes/chart/multitype?from-embed=&file=/App.tsx

chart.js version

4.4

react-chartjs-2 version

5.2

Possible solution

No response

apirahman55 commented 11 months ago

I got the same issue, last 3 month ago my app success do production build without any issue but for now i don't know its goes error on production because chart type error. currently i solve this issue with my old lock files backup.