diff --git a/modules/lamassu-lnbits.nix b/modules/lamassu-lnbits.nix index 6a7df16..d7191ee 100644 --- a/modules/lamassu-lnbits.nix +++ b/modules/lamassu-lnbits.nix @@ -322,6 +322,11 @@ in # CRITICAL: pnpm fails without TTY unless CI=true is set # See: https://github.com/pnpm/pnpm/issues/6434 CI = "true"; + # Set CC/CXX for node-gyp + CC = "${pkgs.stdenv.cc}/bin/cc"; + CXX = "${pkgs.stdenv.cc}/bin/c++"; + # Limit concurrent scripts to avoid race conditions + npm_config_jobs = "1"; }; serviceConfig = { @@ -396,7 +401,8 @@ in fi echo "==> Installing dependencies with pnpm..." - pnpm install --no-frozen-lockfile + # Use --child-concurrency=1 to run install scripts sequentially (avoids race conditions) + pnpm install --no-frozen-lockfile --child-concurrency=1 echo "==> Building project..." pnpm build