Working with Extremely Large Files
By default, Node sets the maximum available heap size on 32-bit platforms to 700 MB, on 64-bit platforms to 1,400 MB — and it may be too low for your enormous files.
You can increase the heap size by setting the
NODE_OPTION environment variable higher than the default. For example, if you have 8 GB RAM in your machine, you may dedicate 4 GB to the Node process with setting the value of
--max_old_space_size=4096. The value following
--max_old_space_size is given in megabytes.