- Published on
In March 2024, our Next.js project started failing to build on Vercel with out-of-memory (OOM) errors after we introduced the App Router. Traditional fixes like `NODE_OPTIONS` did not help, and debugging was difficult due to limited container memory and lack of tooling. By inspecting Next.js source code, tuning `experimental.cpus` and `webpackBuildWorker`, and disabling production source maps, we raised build success rates to around 80%—restoring stability to a complex, long-running project.