以下、ヒープ領域(動的に確保可能なメモリの領域)のサイズを 4GB に増やす例。

$ node --max-old-space-size=4096 main.js