anomalyco / anomalyco/opencode
@opencode/cli fails to run when install scripts are disabled
Open
@nexxeln is already working on this.
Since Sep 14, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When installing @opencode/cli in environments where lifecycle scripts are disabled (such as Node 26 / npm 12 where allowScripts is false by default, or with --ignore-scripts), running opencode fails with:
Error: @opencode/cli's postinstall script was not run. This occurs when installation scripts are disabled.
Even though the platform-specific native package (e.g. @opencode/cli-linux-x64) is installed via optionalDependencies, the published bin points to an unlinked binary stub instead of running bin/opencode.cjs to resolve and execute the binary.
Plugins
None
OpenCode version
2.0.3
Steps to reproduce
npm install -g @opencode/cli --ignore-scripts- Run
opencode
Operating System
Ubuntu 24.04 (Linux x64)
Terminal
bash
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.