anomalyco / anomalyco/opencode

@opencode/cli fails to run when install scripts are disabled

Open
#48,884 1 comment 0 reactions 1 assignee View on GitHub

@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
  1. npm install -g @opencode/cli --ignore-scripts
  2. Run opencode
Operating System

Ubuntu 24.04 (Linux x64)

Terminal

bash

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.