DEV Community

Discussion on: How to create a choropleth Map or Geographic HeatMap in React

jasonnn0210 profile image

Hello Rajesh, I tried doing this, but I am met with an error of "Attempted import error: 'd3' does not contain a default export (imported as 'd3'). " I googled around and instead changed the import to "import * as d3 from 'd3' " but I am met with another error of " Attempted import error: 'geo' is not exported from 'd3' (imported as 'd3'). " Do you have any idea on how to get around this issue? I used npm i d3, is there any further steps that I have to take in order for d3 to be imported correctly? Thanks and I look forward to your reply! :-)

webdevraj profile image
Rajesh Sharma Author

You don't need to install d3 separately, just install 'datamaps'.
You can have a look at my github repository -