Hi everyone,
I’m troubleshooting a Vercel Linux build that stops before Next.js starts.
Our build uses a Node.js wrapper with a guard that checks the build environment. The guard detected exactly one V8 old-space memory limit option in NODE_OPTIONS (--max-old-space-size or --max_old_space_size).
Here’s what we’ve confirmed:
- No additional or unrelated Node.js options were detected.
- No project-specific isolation environment variables were present.
- Neither NODE_OPTIONS nor npm_config_node_options appears in our current project-level Production environment settings.
- The actual memory limit value and the source of the option remain unknown.
I’d like to understand:
- Does Vercel automatically set NODE_OPTIONS during Linux builds?
- Could npm, the framework builder, or another build tool be responsible?
- Is this behavior documented, and can it vary depending on the build environment?
- What’s the safest supported way to accommodate a single memory limit option while continuing to reject unrelated, mixed, or malformed options?
We’d prefer not to disable the guard or modify production settings.
Any guidance or links to official documentation would be appreciated.
Thanks!