Failed: build exceeded memory limit and was terminated
how ti fix this , i am using next js
5 Replies
Hi. We recently upgraded our infrastructure which gives builds significantly increased disk IO. It looks like a small number of projects are consuming more memory as a result.
Here are some things that may help:
Reduce concurrency settings in your build (if applicable.) Eg. next.js defaults to 7 threads that can be overridden by specifying experimental.cpus: 4.
Reduce Node memory by specifying an environment variable:
NODE_OPTIONS=--max-old-space-size=3072
(if you’re setting this elsewhere already, then change it there instead).i have this error
then probably you can't reduce the memory too much, because it's running out of memory