'JavaScript heap out of memory while exporting with SheetJS[cant increase memory]

I am exporting 100k userdata from mongodb and while processing those data I create object and add to array. In that process, the server throws out of memory erray. Any effiecient solution to export those files using mongoose and sheetjs??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source