fix(npm): install a runnable binary on every Linux arch and libc - #1038
Merged
Conversation
postinstall.js resolved the download target via @napi-rs/triples, which always answers `*-unknown-linux-gnu` for Linux. We only publish a gnu build for x86_64, so: - linux/arm64, linux/arm and linux/ia32 fail during install with "Failed fetching the binary: Not Found" — Graviton/Ampere, ARM CI runners, Docker on Apple Silicon, Raspberry Pi. - linux/x64 on musl installs fine, then cannot execute at all: "Dynamic loader not found: /lib64/ld-linux-x86-64.so.2". Replace it with an explicit platform/arch -> triple map covering exactly the targets release.yml builds, with Linux on the static musl builds — the choice install.sh already makes deliberately. Unsupported platforms now name what is supported instead of surfacing a bare 404. Drops @napi-rs/triples. Also stop bin/railway.js flattening every failure to exit 1, which is why #990 reported "exits with code 1, no error message" for what was actually a crash: exit 2/42/255 -> 2/42/255 (was 1/1/1) SIGSEGV/SIGINT -> 139/130 (was 1/1) missing binary -> 127 + remediation (was 1, no output) Verified with a real `npm i -g` of the packed tarball on linux/amd64 and linux/arm64, on glibc and musl, plus natively on darwin/arm64. All four Linux combinations previously failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm i -g @railway/cliis broken on a large share of Linux hosts.postinstall.js resolved the download target via
@napi-rs/triples, which always answers*-unknown-linux-gnufor Linux. We only publish a gnu build for x86_64:Failed fetching the binary: Not FoundDynamic loader not found: /lib64/ld-linux-x86-64.so.2That covers Graviton/Ampere, ARM CI runners, Docker on Apple Silicon, Raspberry Pi, and Alpine.
Changes
release.ymlbuilds, with Linux on the static musl builds — the choiceinstall.shalready makes deliberately ("use the statically compiled musl bins on linux to avoid linking issues")@napi-rs/triplesbin/railway.jsno longer flattens every failure to exit 1. This is whyagents.railway.cominstall fails silently in several common cases (segfault,set -e+whoami,shvsbash) #990 reported "exits with code 1, no error message" for what was actually a crash.Verification — real
npm i -gof the packed tarball on linux/amd64 and linux/arm64 × glibc (node:24) and musl (node:24-alpine), plus natively on darwin/arm64. All four Linux combinations failed before this change. Every mapped target confirmed to exist as a release asset.🤖 Generated with Claude Code