- Ya
- 14 Agosti 2026, 16:15 UTC
- Mwandishi
- kamo
- Ahadi ya
- daa0684
The image build died in `next build` with Downloading swc package @next/swc-linux-x64-gnu... unhandledRejection TypeError: terminated (UND_ERR_SOCKET) after reading 31 MB of a ~40 MB download. That line is not a musl/glibc mixup — Next's fallback walks every triple for the arch in order and gnu is simply first, so seeing it at all proves NO swc binary was installed. Why it was missing: @next/swc-<platform> is an OPTIONAL dependency, and npm exits 0 after silently skipping an optional package whose fetch failed. This runner's egress is already known to corrupt TLS streams mid-fetch — the same run shows ERR_SSL_CIPHER_OPERATION_FAILED killing the first npm ci outright. The retry added in 73fefff9 exists for exactly that flakiness, but it only watches npm's exit code, so the one package the build cannot proceed without is the one failure it could not see. `next build` then re-downloads the binary itself over the same link with no retry and no cache, which is the failure that actually surfaces. Verifying the binary after each install attempt turns the silent drop back into an ordinary install failure the existing retry handles. The guard reads Next's own triple table rather than hardcoding a platform, so it cannot drift from the loader it guards. Verified in node:24-alpine on the runner, with the real lockfile and the real `npm ci --legacy-peer-deps --force`: installs swc-linux-x64-musl and the guard passes; with the binary removed the guard fails with an actionable message. (Also confirms --force is not itself the cause.)