"export 'default' (reexported as 'Chart') was not found in 'chart.js'
See original GitHub issueI am trying to use charts in React but I get this error when compiling
WARNING in ./node_modules/react-chartjs-2/es/index.js 538:0-17 "export 'default' (reexported as 'Chart') was not found in 'chart.js'
I do have chart.js as a dependency in my package.json
"dependencies": { "bootstrap": "^4.5.0", "chart.js": "^3.0.0-alpha.2", "react": "^16.13.1", "react-bootstrap": "^1.0.1", "react-chartjs-2": "^2.9.0", "react-dom": "^16.13.1", "react-redux": "^7.2.0", "react-router-dom": "^5.2.0", "redux": "^4.0.5" },
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
export 'default' (imported as 'Chart') was not found in 'chart.js'
Guess you are trying to import chart.js like this import Chart from 'chart.js' , since chart.js v3 chart.js is treeshakable so you will...
Read more >export 'default' (reexported as 'Chart') was not found in 'chart.js'
I am trying to use charts in React but I get this error when compiling WARNING in ./node_modules/react-chartjs-2/es/index.js 538:0-17 "export 'default' ...
Read more >export 'default' (imported as 'Chart') was not found in 'chart.js'
Coding example for the question "export 'default' (imported as 'Chart') was not found in 'chart.js'-Chart.js.
Read more >Integration | Chart.js
Chart.js is tree-shakeable, so it is necessary to import and register the controllers, elements, scales and plugins you are going to use. # ......
Read more >Migration from v4 to v5 - vue-chartjs
Chart.js v4 and vue-chartjs v5 are ESM-only packages. ... BarChart.js import { Bar } from 'vue-chartjs' export default { extends: Bar, ...
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
This library currently does not support
chart.js ^3.0.0
@ghost Please use latest versions of chartjs and react-chartjs-2.