reactchartjs / react-chartjs-2

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

[Bug]: can’t resolve #1208

Closed hood closed 9 months ago

hood commented 9 months ago

Would you like to work on a fix?

Current and expected behavior

I’m currently getting the following error:

Can't resolve 'chart.js/auto' in '/Users/****/projects/****/node_modules/react-chartjs-2/dist’

Which looks the same as https://github.com/reactchartjs/react-chartjs-2/issues/669.

I’m on react-chartjs-2@3.3.0 and chart.js@3.9.1.

Am I missing anything? Reading the guides, this looks like it should work OOTB.

Reproduction

-

chart.js version

3.9.1

react-chartjs-2 version

3.3.0

Possible solution

No response

EDIT: Also tried react-chartjs-2@4.3.1 and chart.js@3.9.1, but still getting errors:

Can't resolve 'chart.js/auto' in '/Users/****/projects/****/node_modules/react-chartjs-2/dist'

If you're trying to use a package make sure that 'chart.js/auto' is
installed. If you're trying to use a local file make sure that the path is
 correct.

File: node_modules/react-chartjs-2/dist/index.modern.js:1:0
hood commented 9 months ago

Never mind, project consuming it was, for unknown reason, pinning chart.js to an older version.