./node_modules/react-chartjs-2/dist/index.modern.js - Can't resolve 'chart.js/auto'
See original GitHub issueHi, i was previously using the @reactchartjs/react-chart.js package and I just switched to ‘react-chartjs-2’ since it’s now deprecated. Just installed the below: “chart.js”: “^2.9.4”, “react-chartjs-2”: “^3.0.3”,
Now, the mere fact of importing a chart throws the below compiling error due to the absence of ‘chart.js/auto’
import { Radar } from "react-chartjs-2";
Failed to compile. ./node_modules/react-chartjs-2/dist/index.modern.js Module not found: Can’t resolve ‘chart.js/auto’
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:6
Top Results From Across the Web
2 - Stack Overflow
Can't resolve 'chart.js/auto' ; React from ; import { Bar } ; "react-chartjs-2"; function ; ) { const ; "1", "2" ...
Read more >This issue was moved to a discussion. - GitHub
node_modules/react-chartjs-2/dist/index.modern.js Module not found: Can't resolve ... Module not found: Can't resolve 'chart.js/auto #9397.
Read more >Integration | Chart.js
Chart.js can be integrated with plain JavaScript or with different module loaders. The examples below show how to load Chart.js in different ...
Read more >Webpack Error "Can't resolve chart.js&
p>I'm getting Can't resolve chart.js when including mdbpro in my webpack config.</p> <p>This is the line in the webpack.config: import 'mdbootstrap-pro' ...
Read more >How To Use Chart.js in Angular with ng2-charts - DigitalOcean
Together, these libraries provide you with the power to present data in a way that is modern and dynamic. If you'd like to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was getting the same error and was able to resolve by installing chart.js 3.0.0 version. But now getting below error
Module parse failed: ……/chart.js/dist/chart.esm.js Unexpected token (6554:12) You may need an appropriate loader to handle this file type. if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) { decimated.push({ …data[intermediateIndex1], x: avgX, });
But the readme says this lib supports Chart.js v2. So is it or not?