This may sound stupid, but I know very little javascript/typescript. I’m trying to use react-chartjs-2 through scala.js.
The relevant sections of my package.json (generated by scala bundler) is:
"private": true,
"license": "UNLICENSED",
"dependencies": {
"react-dom": "18.3.0",
"chart.js": "4.4.3",
"csstype": "3.1.3",
"react": "18.3.0",
"@types/react-dom": "18.3.0",
"semantic-ui-react": "2.1.5",
"@types/prop-types": "15.7.12",
"react-chartjs-2": "5.2.0",
"@types/react": "18.3.0"
},
"devDependencies": {
"source-map-loader": "2.0.0",
"webpack": "5.24.3",
"typescript": "4.3",
"concat-with-sourcemaps": "1.0.7",
"webpack-cli": "4.5.0",
"webpack-dev-server": "3.11.2"
}
}```
When I try to build this, I get the following error:
```Module not found: Error: Package path ./dist/typedCharts is not exported from package [redacted]/main/node_modules/react-chartjs-2 (see exports field in [redacted]/main/node_modules/react-chartjs-2/package.json)```
Any idea on how to fix this?
I was expecting no errors, other react packages (e.g. semantic-ui-react) work without a hitch.