question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"export 'default' (reexported as 'Chart') was not found in 'chart.js'

See original GitHub issue

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' (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:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jhonnoldcommented, Jul 30, 2020

This library currently does not support chart.js ^3.0.0

0reactions
dangreencommented, Oct 26, 2021

@ghost Please use latest versions of chartjs and react-chartjs-2.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found