Gatsby v4 Build Fails when using >2GB Node.js Heap

We just tried setting NODE_OPTIONS to --max-old-space-size=4096 as an environment variable in the Render dashboard, and this seems to make the build succeed.

But I wonder why this works and setting it in the npm script causes it to fail… :thinking: