Skip to content

[Bug]: Installation fails with npx and bunx on multiple systems globally #1294

Closed

Description

@shrimpwtf

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation

Bug Description

Description

Installation of oh-my-opencode fails consistently across multiple computers on different networks worldwide when using both npx and bunx package runners.

Environment

  • Tested on: 3 different computers across different global networks
  • OS: macOS (Darwin 25.2.0, ARM64)
  • Node: v22.18.0
  • npm: v11.5.2
  • Bun: Available at /Users/shrimp/.bun/bin/bunx

Steps to Reproduce

  1. Follow the installation guide instructions
  2. Run: bunx oh-my-opencode install --no-tui --claude=yes --gemini=yes --copilot=yes
  3. Alternatively run: npx oh-my-opencode install --no-tui --claude=yes --gemini=yes --copilot=yes

Expected Behavior

oh-my-opencode should install successfully and configure the specified providers.

Actual Behavior

With bunx:

Resolving dependencies
Resolved, downloaded and extracted [264]
error: Workspace dependency "@opencode-ai/sdk" not found

Searched in "./*"

Workspace documentation: https://bun.sh/docs/install/workspaces

error: zod@catalog: failed to resolve
error: @opencode-ai/sdk@workspace:* failed to resolve

With npx:

npm warn exec The following package was not found and will be installed: [email protected]
npm error A complete log of this run can be found in: /Users/shrimp/.npm/_logs/2026-01-30T18_00_04_856Z-debug-0.log

The npm log shows successful resolution of dependencies (lines 1-249 in the debug log) but exits with code 1 without a clear error message. The log shows all dependencies including @opencode-ai/[email protected] and @opencode-ai/[email protected] being resolved successfully, but the installation still fails.

Doctor Output

➜  ~ bunx oh-my-opencode doctor
error: Workspace dependency "@opencode-ai/sdk" not found

Searched in "./*"

Workspace documentation: https://bun.sh/docs/install/workspaces

error: zod@catalog: failed to resolve
error: @opencode-ai/sdk@workspace:* failed to resolve
➜  ~

Error Logs

Configuration

Additional Context

No response

Operating System

macOS

OpenCode Version

1.1.23

Activity

  1. eleqtrizit commented on Jan 30, 2026

    @eleqtrizit

    Same here. Busted my Opencode entirely, too. I keep trying to back down to older version of my oh-my-opencode but I can't seem to find a version that works.

  2. KevosG commented on Jan 30, 2026

    @KevosG

    Same issue. Verified.

  3. cpkt9762 commented on Jan 30, 2026

    @cpkt9762
    Contributor
    • @opencode-ai/[email protected] 发布时包含了错误的依赖格式(workspace:* 和 catalog: 协议),导致 npm 无法正常解析依赖
    • 通过使用 npm overrides 强制指定 @opencode-ai/[email protected] 版本绕过了这个问题

    opencode-ai 团队在发布 @opencode-ai/[email protected] 时,没有正确处理 pnpm 的工作空间协议(workspace:* 和 catalog:)。这些协议应该在 npm publish 时被自动替换成实际版本号,但显然这一步失败了。
    这是 opencode-ai 的 CI/CD 或发布流程的 bug。oh-my-opencode 只是无辜受害者。

  4. xhhoweb commented on Jan 30, 2026

    @xhhoweb

    现在已经无法使用了,必须得删除才可以打开opencode

  5. eleqtrizit commented on Jan 30, 2026

    @eleqtrizit

    I downloaded this repo and threw some tokens at the problem. My Opencode is fixed now.

    Claude's analysis:

    Problem

    OpenCode failed to start with BunInstallFailedError when trying to install the oh-my-opencode plugin:

    {
      "name": "BunInstallFailedError",
      "data": {
        "pkg": "oh-my-opencode",
        "version": "latest"
      }
    }
    

    Additionally, bunx oh-my-opencode doctor and npx oh-my-opencode failed with:

    npm error code EUNSUPPORTEDPROTOCOL
    npm error Unsupported URL Type "catalog:": catalog:
    

    Root Cause

    The bun.lock file in ~/.config/opencode/ contained corrupted workspace configuration that was leaking into dependency resolution. When Bun tried to install oh-my-opencode, it incorrectly applied workspace/catalog protocol resolution, which npm doesn't understand, causing installation to fail.

    Fix Commands

    # Remove corrupted bun.lock
    rm ~/.config/opencode/bun.lock
    
    # Reinstall dependencies cleanly
    cd ~/.config/opencode
    bun install
    
    # Install oh-my-opencode plugin explicitly
    bun add oh-my-opencode
  6. xhhoweb commented on Jan 30, 2026

    @xhhoweb

    我下载了这个仓库,并尝试用一些令牌解决问题。我的 Opencode 现在修复了。

    克劳德的分析:

    问题

    BunInstallFailedErrorOpenCode在尝试安装插件时启动失败oh-my-opencode:

    {
      "name": "BunInstallFailedError",
      "data": {
        "pkg": "oh-my-opencode",
        "version": "latest"
      }
    }
    

    此外,bunx oh-my-opencode doctor还npx oh-my-opencode失败了:

    npm error code EUNSUPPORTEDPROTOCOL
    npm error Unsupported URL Type "catalog:": catalog:
    

    根本原因

    该bun.lock文件~/.config/opencode/包含损坏的工作区配置,该配置影响了依赖项解析。当 Bun 尝试安装时oh-my-opencode,它错误地应用了 npm 无法识别的工作区/目录协议解析,导致安装失败。

    修复命令

    Remove corrupted bun.lock

    rm ~/.config/opencode/bun.lock

    Reinstall dependencies cleanly

    cd ~/.config/opencode
    bun install

    Install oh-my-opencode plugin explicitly

    bun add oh-my-opencode

    我试过了还是无法启动

  7. xhhoweb commented on Jan 30, 2026

    @xhhoweb

    尝试新的跨平台 PowerShell https://aka.ms/pscore6

    PS C:\Users\Administrator> # Remove corrupted bun.lock
    PS C:\Users\Administrator> rm ~/.config/opencode/bun.lock
    PS C:\Users\Administrator>
    PS C:\Users\Administrator> # Reinstall dependencies cleanly
    PS C:\Users\Administrator> cd ~/.config/opencode
    PS C:\Users\Administrator.config\opencode> bun install
    bun install v1.3.6 (d530ed99)

    Checked 110 installs across 131 packages (no changes) [96.00ms]
    PS C:\Users\Administrator.config\opencode>
    PS C:\Users\Administrator.config\opencode> # Install oh-my-opencode plugin explicitly
    PS C:\Users\Administrator.config\opencode> bun add oh-my-opencode
    bun add v1.3.6 (d530ed99)

    installed [email protected] with binaries:

    • oh-my-opencode

    [48.00ms] done
    PS C:\Users\Administrator.config\opencode>

  8. akring commented on Jan 30, 2026

    @akring

    bun add oh-my-opencode

    Worked for me, thank you!

  9. electroheadfx commented on Jan 30, 2026

    @electroheadfx

    bun add oh-my-opencode

    I tried, my opencode is always fucked, I have white window when I open :(

  10. electroheadfx commented on Jan 30, 2026

    @electroheadfx

    我下载了这个仓库,并尝试用一些令牌解决问题。我的 Opencode 现在修复了。
    克劳德的分析:

    问题

    BunInstallFailedErrorOpenCode在尝试安装插件时启动失败oh-my-opencode:

    {
      "name": "BunInstallFailedError",
      "data": {
        "pkg": "oh-my-opencode",
        "version": "latest"
      }
    }
    

    此外,bunx oh-my-opencode doctor还npx oh-my-opencode失败了:

    npm error code EUNSUPPORTEDPROTOCOL
    npm error Unsupported URL Type "catalog:": catalog:
    

    根本原因

    该bun.lock文件~/.config/opencode/包含损坏的工作区配置,该配置影响了依赖项解析。当 Bun 尝试安装时oh-my-opencode,它错误地应用了 npm 无法识别的工作区/目录协议解析,导致安装失败。

    修复命令

    Remove corrupted bun.lock

    rm ~/.config/opencode/bun.lock

    Reinstall dependencies cleanly

    cd ~/.config/opencode
    bun install

    Install oh-my-opencode plugin explicitly

    bun add oh-my-opencode

    我试过了还是无法启动

    me too it doesn't work

  11. electroheadfx commented on Jan 30, 2026

    @electroheadfx

    My issue was the "oh-my-opencode" and "opencode-google-antigravity-auth" plugins
    I think Both with the corrupted bun.lock fixed too the problem.

  12. imadraude commented on Jan 30, 2026

    @imadraude

    The installation failure was primarily caused by an upstream bug in opencode-ai v1.1.45 (unresolved workspace/catalog dependencies).

    As of now, OpenCode 1.1.47 has been released and it resolves this issue.

    Run opencode upgrade (or npm install -g opencode-ai@latest) and then try installing oh-my-opencode again. It should work fine now!

  13. electroheadfx commented on Jan 30, 2026

    @electroheadfx

    The installation failure was primarily caused by an upstream bug in opencode-ai v1.1.45 (unresolved workspace/catalog dependencies).

    As of now, OpenCode 1.1.47 has been released and it resolves this issue.

    Run opencode upgrade (or npm install -g opencode-ai@latest) and then try installing oh-my-opencode again. It should work fine now!

    thanks

    From me Iam in 1.1.45, i tried brew upgrade or opencode upgrade no 1.1.47 come.
    From my side with 1.1.45, the opencode-google-antigravity-auth plugin is not more supported : shekohex/opencode-google-antigravity-auth#36

  14. vmagalhaes commented on Jan 30, 2026

    @vmagalhaes

    The installation failure was primarily caused by an upstream bug in opencode-ai v1.1.45 (unresolved workspace/catalog dependencies).

    As of now, OpenCode 1.1.47 has been released and it resolves this issue.

    Run opencode upgrade (or npm install -g opencode-ai@latest) and then try installing oh-my-opencode again. It should work fine now!

    Even after that still the issue

    opencode.jsonc loading ERROR 2026-01-30T22:03:45 +3758ms service=default e=setRawMode failed with errno: 5 exception ERROR 2026-01-30T22:03:45 +0ms service=default Error: setRawMode failed with errno: 5 ERROR 2026-01-30T22:03:45 +21ms service=default e=EIO: i/o error, read exception ERROR 2026-01-30T22:03:45 +0ms service=default Error: EIO: i/o error, read

    And

    INFO  2026-01-30T22:12:00 +3ms service=config path=/Users/x/.config/opencode/config.json loading
    INFO  2026-01-30T22:12:00 +0ms service=config path=/Users/x/.config/opencode/opencode.json loading
    INFO  2026-01-30T22:12:00 +2ms service=config path=/Users/x/.config/opencode/opencode.jsonc loading
    INFO  2026-01-30T22:12:00 +1ms service=config path=/Users/x/.config/opencode/opencode.json loading
    INFO  2026-01-30T22:12:00 +1ms service=bun cmd=["/Users/x/.nvm/versions/node/v22.18.0/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/x/.config/opencode running
    INFO  2026-01-30T22:12:00 +8ms service=plugin name=CodexAuthPlugin loading internal plugin
    INFO  2026-01-30T22:12:00 +1ms service=plugin name=CopilotAuthPlugin loading internal plugin
    INFO  2026-01-30T22:12:00 +0ms service=plugin path=file:///Users/x/.config/opencode/node_modules/oh-my-opencode/dist/index.js loading plugin
    INFO  2026-01-30T22:12:01 +506ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)
    
    installed @opencode-ai/[email protected]
    
    [20.00ms] done
     stderr=Saved lockfile
     done
    INFO  2026-01-30T22:12:01 +0ms service=bun cmd=["/Users/x/.nvm/versions/node/v22.18.0/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","install"] cwd=/Users/x/.config/opencode running
    INFO  2026-01-30T22:12:01 +8ms service=plugin [email protected] loading plugin
    INFO  2026-01-30T22:12:01 +23ms service=plugin path=@gitlab/[email protected] loading plugin
    INFO  2026-01-30T22:12:01 +1ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
    
    Checked 117 installs across 137 packages (no changes) [19.00ms]
     stderr= done
    INFO  2026-01-30T22:12:01 +70ms service=server method=GET path=/provider request
    INFO  2026-01-30T22:12:01 +0ms service=server status=started method=GET path=/provider request
    `
    
  15. imadraude commented on Jan 30, 2026

    @imadraude

    @shrimpwtf @eleqtrizit @KevosG @cpkt9762 @xhhoweb @electroheadfx @vmagalhaes

    Update 2: While opencode-ai v1.1.47 fixes the installation/dependency errors, it appears there is still a runtime hang in oh-my-opencode v3.1.9.

    The TUI currently freezes during /provider initialization. If you need to use OpenCode right now, you may need to temporarily disable the plugin or pin to v3.1.8 until a fix for the runtime hang is released.

  16. vmagalhaes commented on Jan 30, 2026

    @vmagalhaes

    @shrimpwtf @eleqtrizit @KevosG @cpkt9762 @xhhoweb @electroheadfx @vmagalhaes

    Update: If you are still facing issues after upgrading to v1.1.47, try removing the corrupted lockfile and reinstalling:

    rm ~/.config/opencode/bun.lock
    opencode upgrade
    This forces OpenCode to re-resolve dependencies correctly without using the broken cached versions from earlier today.

    I tried it but unfortunately the TUI is "blank"
    When adding to "plugin" the issue appear.

    I tried fully reinstall opencode and oh-my-code. Cleaned npm and bun caches, but still the issue persist.

    L-G0VDGDJW9P:opencode x$ opencode run hello --print-logs
    INFO  2026-01-30T22:45:07 +266ms service=default version=1.1.47 args=["run","hello","--print-logs"] opencode
    INFO  2026-01-30T22:45:07 +0ms service=default directory=/Users/x/.config/opencode creating instance
    INFO  2026-01-30T22:45:07 +1ms service=project directory=/Users/x/.config/opencode fromDirectory
    INFO  2026-01-30T22:45:07 +5ms service=default directory=/Users/x/.config/opencode bootstrapping
    INFO  2026-01-30T22:45:07 +2ms service=config path=/Users/x/.config/opencode/config.json loading
    INFO  2026-01-30T22:45:07 +0ms service=config path=/Users/x/.config/opencode/opencode.json loading
    INFO  2026-01-30T22:45:07 +6ms service=config path=/Users/x/.config/opencode/opencode.jsonc loading
    INFO  2026-01-30T22:45:07 +1ms service=config path=/Users/x/.config/opencode/opencode.json loading
    INFO  2026-01-30T22:45:07 +1ms service=bun cmd=["/Users/x/.nvm/versions/node/v22.18.0/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/x/.config/opencode running
    INFO  2026-01-30T22:45:07 +9ms service=plugin name=CodexAuthPlugin loading internal plugin
    INFO  2026-01-30T22:45:07 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin
    INFO  2026-01-30T22:45:07 +0ms service=plugin path=file:///Users/x/.config/opencode/node_modules/oh-my-opencode/dist/index.js loading plugin
    INFO  2026-01-30T22:45:07 +497ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)
    
    installed @opencode-ai/[email protected]
    
    [18.00ms] done
     stderr=Saved lockfile
     done
    INFO  2026-01-30T22:45:07 +0ms service=bun cmd=["/Users/x/.nvm/versions/node/v22.18.0/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","install"] cwd=/Users/x/.config/opencode running
    INFO  2026-01-30T22:45:07 +7ms service=plugin [email protected] loading plugin
    INFO  2026-01-30T22:45:07 +22ms service=plugin path=@gitlab/[email protected] loading plugin
    INFO  2026-01-30T22:45:07 +1ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
    
    Checked 115 installs across 136 packages (no changes) [17.00ms]
     stderr= done
    INFO  2026-01-30T22:45:07 +74ms service=server method=GET path=/provider request
    INFO  2026-01-30T22:45:07 +0ms service=server status=started method=GET path=/provider request
    
  17. shrimpwtf commented on Jan 31, 2026

    @shrimpwtf
    Author

    simply running opencode upgrade seemed to fix it for me. will close if confirm the fix is this simple for others

  18. eleqtrizit commented on Jan 31, 2026

    @eleqtrizit

    I did that when the problem was happening this morning and it did not fix it. Has something been released since then that would fix it?

    I even force reinstalled it by hacking the install script.

  19. electroheadfx commented on Jan 31, 2026

    @electroheadfx

    What plugin(s) you have installed in opencode.json guys ?

  20. electroheadfx commented on Jan 31, 2026

    @electroheadfx

    @shrimpwtf @eleqtrizit @KevosG @cpkt9762 @xhhoweb @electroheadfx @vmagalhaes

    Update 2: While opencode-ai v1.1.47 fixes the installation/dependency errors, it appears there is still a runtime hang in oh-my-opencode v3.1.9.

    The TUI currently freezes during /provider initialization. If you need to use OpenCode right now, you may need to temporarily disable the plugin or pin to v3.1.8 until a fix for the runtime hang is released.

    you mean opencode v1.1.47 not opencode-ai ?
    how you force the update to v1.1.47, I do brew upgrade opencode still the same version v1.1.45

    brew upgrade opencode
    Warning: sst/tap/opencode 1.1.45 already installed
    
    opencode upgrade
    ●  From 1.1.45 → 1.1.40
    │
    ◇  Upgrade complete
    │
    └  Done

    thanks

  21. code-yeongyu commented on Feb 1, 2026

    @code-yeongyu
    Owner

    ✅ This was an upstream OpenCode bug (@opencode-ai/[email protected]) that has been fixed in OpenCode v1.1.47. Please upgrade OpenCode to resolve this issue.

  22. electroheadfx commented on Feb 2, 2026

    @electroheadfx

    its fixed for me with 1.1.47 (woirk work with anti-gravity plugin)

  23. goforu commented on Feb 4, 2026

    @goforu

    it's happening now in 3.2.3, switch back to 3.2.2 solve the problem

  24. electroheadfx commented on Feb 4, 2026

    @electroheadfx

    it's happening now in 3.2.3, switch back to 3.2.2 solve the problem

    you mean opencode cli ? its 1.1.x actually ?

  25. goforu commented on Feb 4, 2026

    @goforu

    it's happening now in 3.2.3, switch back to 3.2.2 solve the problem

    you mean opencode cli ? its 1.1.x actually ?

    Problem solved, It's my internet issue...

  26. dongshimou commented on Feb 25, 2026

    @dongshimou

    尝试新的跨平台 PowerShell https://aka.ms/pscore6

    PS C:\Users\Administrator> # Remove corrupted bun.lock PS C:\Users\Administrator> rm ~/.config/opencode/bun.lock PS C:\Users\Administrator> PS C:\Users\Administrator> # Reinstall dependencies cleanly PS C:\Users\Administrator> cd ~/.config/opencode PS C:\Users\Administrator.config\opencode> bun install bun install v1.3.6 (d530ed99)

    Checked 110 installs across 131 packages (no changes) [96.00ms] PS C:\Users\Administrator.config\opencode> PS C:\Users\Administrator.config\opencode> # Install oh-my-opencode plugin explicitly PS C:\Users\Administrator.config\opencode> bun add oh-my-opencode bun add v1.3.6 (d530ed99)

    installed [email protected] with binaries:

    • oh-my-opencode

    [48.00ms] done PS C:\Users\Administrator.config\opencode>

    work for me.

    根本原因应该是没安装成功.CMD失败了.我也是切换到powershell成功安装了.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions