davidicus/create-iot-react-app

compile failed - version of d3 installed is incompatible with carbon-charts

tay1orjones opened this issue · 1 comments

Spin up a new app via npx and the automatically installed version of d3 is "d3": "^6.2.0", causes this error

Failed to compile.

./node_modules/@carbon/charts/components/axes/grid-brush.js
Attempted import error: 'event' is not exported from 'd3-selection'.

This version of d3 is incompatible with carbon-charts.

carbon-design-system/carbon-charts#775

It needs to be the same version range they define in their peer deps

https://github.com/carbon-design-system/carbon-charts/blob/master/packages/core/package.json#L58

"d3": ">=5.0.0 <=5.14.2"

fixed in v1.2.5