Search code examples
reactjsag-charts-reactag-charts

export 'AgChartsReact' was not found in 'ag-charts-react'


I'm just trying to follow the simple examples given, like https://charts.ag-grid.com/react/create-a-basic-chart/ and it's not letting me import?

"ag-charts-react": "^9.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",

Did the import change to a 'default', or what can I be doing wrong. Seems pretty simple

Trying to use a standard import: import { AgChartsReact } from 'ag-charts-react';

and I'm getting the error: export 'AgChartsReact' was not found in 'ag-charts-react'


Solution

  • As of today, ag-charts-react versions 9.0.0 and 9.0.1 are not published with a umd/ (Universal Module Definition) as previous versions are. That was the file needed for it to work with my config. I will just run a older version and see if I can find out if that missing DIR was a mistake or forward approach to the ag-charts-react package.

    Thanks G1N, that simple question helped me track it down.