Skip to content

Fix npm CLI binary installation#27801

Merged
thdxr merged 3 commits into
devfrom
fix/npm-native-binary-install
May 15, 2026
Merged

Fix npm CLI binary installation#27801
thdxr merged 3 commits into
devfrom
fix/npm-native-binary-install

Conversation

@thdxr

@thdxr thdxr commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the published npm runtime wrapper with an install-time native binary selection flow.
  • Generate the public package bin as bin/opencode.exe and copy/link the selected native binary there during postinstall.
  • Add a snapshot npm install smoke test to verify the published package can run from npm.

Testing

  • bun typecheck from packages/opencode
  • node --check script/postinstall.mjs

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@thdxr thdxr merged commit 0954966 into dev May 15, 2026
11 of 18 checks passed
@thdxr thdxr deleted the fix/npm-native-binary-install branch May 15, 2026 22:43
zenoda pushed a commit to zenoda/opencode that referenced this pull request May 16, 2026
@lcyang3

lcyang3 commented Jun 1, 2026

Copy link
Copy Markdown

Getting an error when running npm install opencode-ai -g on Windows.

C:\Users\xxxx>npm install opencode-ai -g
npm warn code 1
npm warn path C:\Users\xxxx\AppData\Roaming\npm\node_modules\opencode-ai
npm warn command failed
npm warn command C:\Windows\system32\cmd.exe /d /s /c node ./postinstall.mjs
npm ERROR It seems your package manager failed to install the right opencode CLI package. Try manually installing "opencode-windows-x64-baseline" or "opencode-windows-x64".

AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants