objects-to-csv
objects-to-csv copied to clipboard
Maximum call stack size exceeded with a lot of data
When data is big (I had 432504 objects), this error happens: RangeError: Maximum call stack size exceeded at convert (/project/node_modules/objects-to-csv/index.js:134:12) at ObjectsToCsv.toString (/project/node_modules/objects-to-csv/index.js:96:18) at ObjectsToCsv.toDisk (/project/node_modules/objects-to-csv/index.js:56:27)
Me too. What a crap!
I experienced the same issue when processing large data sets.
It's happening on index.js line 135, the use of the spread operator. Due to the nature of the spread operator and your large data array, it causing it to exceed the allocated call stack memory.
There seems to be a pending PR fixing this issue but it's been pending since Oct. 13..
Until its merged, if you need a fast temporary solution, you can clone the library down and replace the chunk of code yourself.
You can see the fix here: https://github.com/anton-bot/objects-to-csv/pull/12/commits/41ffed2ba810b9ae9630d568958af9cfe07250e4
Same here! @anton-bot вмержь пожалуйста фикс =)