Solution with Code Example
Open package.json, change this line –
with this one –
"dev": "NODE_OPTIONS=--max-old-space-size=4096 next",
This will add 4096 MB of memory to this application.