Skip to content

cli: TUI plugin installation fails with NpmInstallFailedError #58514

Closed as duplicate

Description

@S74RK1113R

Summary

The TUI plugin opencode-sdd-engram-manage consistently fails during global plugin reconciliation and is never installed.

Environment

  • opencode version: 2.1.4
  • OS: Linux x86_64, PikaOS kernel 7.2.6
  • Terminal: xterm-256color, truecolor
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: opencode-subagent-statusline, opencode-sdd-engram-manage, and local plugins

Reproduction

  1. Add opencode-sdd-engram-manage to the global OpenCode CLI plugin list.
  2. Start or reload OpenCode in a project.
  3. Observe plugin reconciliation.

Expected Behavior

The plugin dependencies should install successfully and the plugin should appear in opencode plugin list.

Actual Behavior

Plugin preparation fails repeatedly:

plugin operation failed
stage=prepare
error=NpmInstallFailedError
target=opencode-sdd-engram-manage
install=true

The plugin does not appear in opencode plugin list.

The failure reproduced after reload and during a bounded debug startup. Direct npm metadata queries and dependency dry-run resolution succeeded, but OpenCode did not expose the underlying npm stderr.

Additional Context

  • The plugin package is publicly available and declares compatible engines:
    • Node >=24 <25
    • OpenCode >=1.17.11
  • Node 24.20.0 and npm 11.19.0 are installed.
  • No project-local OpenCode configuration is involved.
  • A duplicate legacy TUI declaration was removed; the failure persists with only the V2 CLI declaration.
  • Earlier logs also showed intermittent network timeouts for unrelated OpenCode external fetches.
  • No credentials or secrets are included in this report.
  • Relevant sanitized log location: ~/.local/share/opencode/log/opencode.log

Activity

  1. opencode-agent commented on Oct 23, 2026

    @opencode-agent
    Contributor

    Thanks for the report! I think this is a duplicate of #50080. It covers the same package (opencode-sdd-engram-manage) set as a bare name, which resolves to @latest. That fails plugin reconciliation at stage=prepare with an NpmInstallFailedError whose message is empty. The real cause, unable to resolve dependency tree at Npm.reify, only appears when you run opencode plugin add opencode-sdd-engram-manage directly. System npm installs the package fine.

    Possible duplicates and related issues, ordered by likelihood:

    Workaround reported in #50080: pin an exact version in your CLI plugin list, e.g. "[email protected]". You can also run opencode plugin add [email protected], which installs through the same code path.

    A short comment on #50080 saying it still happens on 2.1.4 (Linux) would help. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent commented on Oct 24, 2026

    @opencode-agent
    Contributor

    Closing this as a duplicate of #50080, since there's been no reply in the past day explaining how it's different. #50080 covers the same failure: opencode-sdd-engram-manage set as a bare name (@latest) fails reconciliation at stage=prepare with an empty NpmInstallFailedError. The cause is unable to resolve dependency tree at Npm.reify. Until it's fixed, pinning an exact version (e.g. "[email protected]") works around it. Please follow #50080 for updates. A short comment there saying it still happens on 2.1.4 (Linux) would help. If your problem turns out to be different, reply here and we can reopen. Thanks for the detailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions