DEV Community

Gautam Sarawagi
Gautam Sarawagi

Posted on

Help Needed !! Topojsons build error in react: Reached heap limit Allocation failed

I am trying to develop an interactive indian map using React where I can click on the any of the states and it opens a the map of that state particulary.

For this I used the topojsons of Indian map and of all the states particualy.Durign the deployement of this complete code I am gettign the error stating: 'FATAL ERROR:

Reached heap limit Allocation failed - JavaScript heap out of memory'.I have added I guess a total of 30 topojson files in my code that is leading me to this error.

Refrence : https://github.com/amurto/react-india-region-selector

I tried to look into the cummulative size of all of the states jsons and found out it to be 5Mb.

which I guess should not be an issue.

I was using an svg before of 15mb for the same task but it was not working well. so shifted to this.

would be great to get the assistance.

Top comments (0)