You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: npm install fails on Alpine Linux (musl) - wrapper script doesn't detect musl variant #9571
When installing opencode-ai via npm on Alpine Linux, installation fails because the wrapper script and postinstall script don't detect musl vs glibc, causing them to look for the wrong binary package.
Root Cause
Both packages/opencode/bin/opencode (line 47) and packages/opencode/script/postinstall.mjs (line 52) only detect platform and architecture but not the libc variant:
// bin/opencode line 47constbase="opencode-"+platform+"-"+arch// This produces: opencode-linux-x64// postinstall.mjs line 52 constpackageName=`opencode-${platform}-${arch}`// This produces: opencode-linux-x64
However, Alpine Linux (musl) requires the -musl suffix:
Both issues stem from the same problem: the wrapper script and postinstall script don't properly detect musl vs glibc libc variants. This affects Alpine Linux (missing musl detection) and WSL2 (incorrect musl selection on glibc systems).
Feel free to ignore if none of these address your specific case.
Activity
github-actions commentedon Jan 20, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues stem from the same problem: the wrapper script and postinstall script don't properly detect musl vs glibc libc variants. This affects Alpine Linux (missing musl detection) and WSL2 (incorrect musl selection on glibc systems).
Feel free to ignore if none of these address your specific case.
fix: detect musl vs glibc for Alpine Linux npm install
fix: detect musl vs glibc for Alpine Linux npm install
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
Fix install hang and wrong runtime command