anomalyco / anomalyco/opencode
Cannot install opencode-ai globally via yarn or npm
@Hona is already working on this.
Since Aug 18, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When installing opencode CLI globally via yarn global add opencode-ai on Windows, the postinstall script fails with exit code 1. The error message says:“It seems your package manager failed to install the right opencode CLI package. Try manually installing 'opencode-windows-x64' or 'opencode-windows-x64-baseline'.”
I have already run npm cache clean --force and retried, but the issue persists. Expected successful installation, but it aborts with the above error.
Environment:
- OS: Windows 11 (or 10)
- Node.js: v20.11.0 (replace with your version)
- yarn: 1.22.22
- Package manager: yarn global
Full log:
PS C:\Users\xxx\AppData\Roaming\npm\node_modules\opencode-windows-x64\bin> yarn global add opencode-ai
yarn global v1.22.22
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error C:\Users\xxx_sensyu\AppData\Local\Yarn\Data\global\node_modules\opencode-ai: Command failed.
Exit code: 1
Command: node ./postinstall.mjs
Arguments:
Directory: C:\Users\xxx_sensyu\AppData\Local\Yarn\Data\global\node_modules\opencode-ai
Output:
It seems your package manager failed to install the right opencode CLI package. Try manually installing "opencode-windows-x64" or "opencode-windows-x64-baseline".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
PowerShell 7.3 or CMD
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.