From b767cff187e75ca48523a9db7fe66e6a03763f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 30 Jul 2026 18:35:38 +0200 Subject: [PATCH] build: carry the heap ceiling in the build script itself MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `next build` needs more than Node's 4 GB default: the TypeScript pass after compilation runs the whole project through the checker and dies with "Ineffective mark-compacts near heap limit" at around 4.07 GB. CI and the production image already knew that. `e2e.yml` and the Dockerfile both invoke the build with `--max-old-space-size=8192`. The bare `pnpm build` did not, so the one place that ran with the default was a local gate — which then failed for a condition that exists in neither environment that matters, and would have kept failing every time somebody ran the documented gate. Three places declared how the build is invoked and one of them disagreed. The script now carries it, so a local run, CI and the image all get the same ceiling. The existing prefixes in the workflow and the Dockerfile stay: they are harmless now, and removing them would put the knowledge back in more than one place. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e94e47ee..aaf6f6dc2 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dev": "next dev", "predev": "node scripts/generate-i18n-boot.mjs", "prebuild": "node scripts/generate-sw-version.mjs && node scripts/generate-i18n-boot.mjs", - "build": "next build", + "build": "NODE_OPTIONS=--max-old-space-size=8192 next build", "analyze": "ANALYZE=1 next build", "bundle-report": "node scripts/check-bundle-budget.mjs", "bundle-check": "node scripts/check-bundle-budget.mjs --check",