The following environment variable can be used:
NODE_OPTIONS= --max-old-space-size=8192 .
Another note: console.log()
also consumes memory in the terminal.
just tried to comment the console.log() on terminal. because that will also take memory.