From 1bf3a57a1c3d11c8adcae84b14aaf9750c95f84f Mon Sep 17 00:00:00 2001 From: truelecter Date: Wed, 14 Oct 2026 18:32:26 +0300 Subject: [PATCH] fix(nix): raise Node heap for the desktop build (#6537) Metro's transform worker runs out of heap on the generated ws-outbound.aot.js validator on machines where Node's default heap is 2 GB, such as the 7 GB macOS runner of the Nix workflow. Set NODE_OPTIONS=--max-old-space-size=4096 in the desktop derivation, as desktop-release.yml already does. Closes #6535 --- nix/desktop-package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/desktop-package.nix b/nix/desktop-package.nix index dae45db386..3fd5f47093 100644 --- a/nix/desktop-package.nix +++ b/nix/desktop-package.nix @@ -86,6 +86,12 @@ buildNpmPackage { # Expo's web build pulls in some pre-bundled assets; ensure it doesn't try # to phone home during the build. CI = "1"; + # Metro's worker runs out of heap transforming the generated + # ws-outbound.aot.js validator (about 12 MB). Node's default heap limit is + # 2 GB on machines with less than 15 GB of memory, such as GitHub's 7 GB + # macOS runners, and 4 GB above that. 4096 MB is that 4 GB ceiling, so this + # only raises the limit on smaller builders, like desktop-release.yml does. + NODE_OPTIONS = "--max-old-space-size=4096"; }; buildPhase = ''