BunInstallFailedError when upgrading opencode #2674

Closed
opened 2026-02-16 17:36:47 -05:00 by yindo · 8 comments
Owner

Originally created by @vanneszias on GitHub (Nov 7, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

I have been using opencode for quite some time now (and loving it!). When trying to upgrade to version 1.0.39 (and also just upgraded to 1.0.40), I get this error when opening opencode again. I also installed the opencode extension in my editor of choice zed.dev recently (which didn't seem to work). Maybe it's related, maybe not?

❯ opencode
Error: Unexpected error, check log file at /Users/zias/.local/share/opencode/log/2025-11-07T174508.log for more details

BunInstallFailedError: BunInstallFailedError
data: {
pkg: "opencode-copilot-auth",
version: "0.0.4",
},

  at src/bun/index.ts:88:17
  at processTicksAndRejections (native:7:39)

41 | code,
42 | stdout,
43 | stderr,
44 | })
45 | if (code !== 0) {
46 | throw new Error(Command failed with exit code ${result.exitCode})
^
error: Command failed with exit code 1
at run2 (src/bun/index.ts:46:13)

The logfile:
INFO 2025-11-07T17:45:08 +359ms service=default version=1.0.40 args=[] opencode
INFO 2025-11-07T17:45:08 +1ms service=project directory=/Users/zias fromDirectory
INFO 2025-11-07T17:45:08 +6ms service=config path=/Users/zias/.config/opencode/config.json loading
INFO 2025-11-07T17:45:08 +1ms service=config path=/Users/zias/.config/opencode/opencode.json loading
INFO 2025-11-07T17:45:08 +0ms service=config path=/Users/zias/.config/opencode/opencode.jsonc loading
INFO 2025-11-07T17:45:08 +1ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/plugin@1.0.40","--exact"] cwd=/Users/zias/.config/opencode running
INFO 2025-11-07T17:45:08 +2ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/plugin@1.0.40","--exact"] cwd=/Users/zias/.opencode running
INFO 2025-11-07T17:45:08 +22ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest @opencode-ai/plugin
done
INFO 2025-11-07T17:45:08 +0ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest @opencode-ai/plugin
done
INFO 2025-11-07T17:45:08 +2ms service=plugin path=opencode-copilot-auth@0.0.4 loading plugin
INFO 2025-11-07T17:45:08 +1ms service=bun pkg=opencode-copilot-auth version=0.0.4 installing package using Bun's default registry resolution
INFO 2025-11-07T17:45:08 +0ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/zias/.cache/opencode","opencode-copilot-auth@0.0.4"] cwd=/Users/zias/.cache/opencode running
INFO 2025-11-07T17:45:08 +11ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=InvalidNPMLockfile: failed to migrate lockfile: 'package-lock.json'

warn: Ignoring lockfile
Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest opencode-copilot-auth
done
ERROR 2025-11-07T17:45:08 +7ms service=default pkg=opencode-copilot-auth version=0.0.4 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError
at (src/bun/index.ts:88:17)
at processTicksAndRejections (native:7:39) fatal

The error message I get from the zed.dev extension: Internal error: "server shut down unexpectedly"

The opencode help command and some others do seem to work, but trying the opencode auth login fails after selecting any provider.

I have already tried removing all opencode configuration and fully uninstalled all caches, as well as reinstalled using homebrew, npm and the curl script. All seem to give the same issue. I am on a base model MacBook Air M2 using Ghostty.

OpenCode version

1.0.40 (latest at time of writing).

Steps to reproduce

  1. Install zed.dev opencode extension
  2. Upgrade opencode to latest version
  3. Unable to launch opencode.

Screenshot and/or share link

No response

Operating System

MacBook Air M2

Terminal

Ghostty

Originally created by @vanneszias on GitHub (Nov 7, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description I have been using opencode for quite some time now (and loving it!). When trying to upgrade to version 1.0.39 (and also just upgraded to 1.0.40), I get this error when opening opencode again. I also installed the opencode extension in my editor of choice zed.dev recently (which didn't seem to work). Maybe it's related, maybe not? ❯ opencode Error: Unexpected error, check log file at /Users/zias/.local/share/opencode/log/2025-11-07T174508.log for more details BunInstallFailedError: BunInstallFailedError data: { pkg: "opencode-copilot-auth", version: "0.0.4", }, at src/bun/index.ts:88:17 at processTicksAndRejections (native:7:39) 41 | code, 42 | stdout, 43 | stderr, 44 | }) 45 | if (code !== 0) { 46 | throw new Error(`Command failed with exit code ${result.exitCode}`) ^ error: Command failed with exit code 1 at run2 (src/bun/index.ts:46:13) The logfile: INFO 2025-11-07T17:45:08 +359ms service=default version=1.0.40 args=[] opencode INFO 2025-11-07T17:45:08 +1ms service=project directory=/Users/zias fromDirectory INFO 2025-11-07T17:45:08 +6ms service=config path=/Users/zias/.config/opencode/config.json loading INFO 2025-11-07T17:45:08 +1ms service=config path=/Users/zias/.config/opencode/opencode.json loading INFO 2025-11-07T17:45:08 +0ms service=config path=/Users/zias/.config/opencode/opencode.jsonc loading INFO 2025-11-07T17:45:08 +1ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/plugin@1.0.40","--exact"] cwd=/Users/zias/.config/opencode running INFO 2025-11-07T17:45:08 +2ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/plugin@1.0.40","--exact"] cwd=/Users/zias/.opencode running INFO 2025-11-07T17:45:08 +22ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34) stderr=Resolving dependencies Resolved, downloaded and extracted [6] error: ConnectionClosed downloading package manifest @opencode-ai/plugin done INFO 2025-11-07T17:45:08 +0ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34) stderr=Resolving dependencies Resolved, downloaded and extracted [6] error: ConnectionClosed downloading package manifest @opencode-ai/plugin done INFO 2025-11-07T17:45:08 +2ms service=plugin path=opencode-copilot-auth@0.0.4 loading plugin INFO 2025-11-07T17:45:08 +1ms service=bun pkg=opencode-copilot-auth version=0.0.4 installing package using Bun's default registry resolution INFO 2025-11-07T17:45:08 +0ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/zias/.cache/opencode","opencode-copilot-auth@0.0.4"] cwd=/Users/zias/.cache/opencode running INFO 2025-11-07T17:45:08 +11ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34) stderr=InvalidNPMLockfile: failed to migrate lockfile: 'package-lock.json' warn: Ignoring lockfile Resolving dependencies Resolved, downloaded and extracted [6] error: ConnectionClosed downloading package manifest opencode-copilot-auth done ERROR 2025-11-07T17:45:08 +7ms service=default pkg=opencode-copilot-auth version=0.0.4 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError at <anonymous> (src/bun/index.ts:88:17) at processTicksAndRejections (native:7:39) fatal The error message I get from the zed.dev extension: Internal error: "server shut down unexpectedly" The opencode help command and some others do seem to work, but trying the opencode auth login fails after selecting any provider. I have already tried removing all opencode configuration and fully uninstalled all caches, as well as reinstalled using homebrew, npm and the curl script. All seem to give the same issue. I am on a base model MacBook Air M2 using Ghostty. ### OpenCode version 1.0.40 (latest at time of writing). ### Steps to reproduce 1. Install zed.dev opencode extension 2. Upgrade opencode to latest version 3. Unable to launch opencode. ### Screenshot and/or share link _No response_ ### Operating System MacBook Air M2 ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:36:47 -05:00
yindo closed this issue 2026-02-16 17:36:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4021: Both involve installation/upgrade problems on macOS with ARM chips, with package integrity/download failures
  • #4029: Zed extension related issues (you mentioned installing the Zed extension recently)
  • #4013: Authentication problems similar to your auth login failures

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 7, 2025): This issue might be a duplicate of existing issues. Please check: - #4021: Both involve installation/upgrade problems on macOS with ARM chips, with package integrity/download failures - #4029: Zed extension related issues (you mentioned installing the Zed extension recently) - #4013: Authentication problems similar to your auth login failures Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 7, 2025):

@vanneszias can you upgrade your zed extension, ill debug whatever this issue is it seems like 2 different things

@rekram1-node commented on GitHub (Nov 7, 2025): @vanneszias can you upgrade your zed extension, ill debug whatever this issue is it seems like 2 different things
Author
Owner

@vanneszias commented on GitHub (Nov 7, 2025):

@rekram1-node just upgraded the zed extension to version 1.0.44. Did not make any difference to the issues seen in zed or the opencode cli.

@vanneszias commented on GitHub (Nov 7, 2025): @rekram1-node just upgraded the zed extension to version 1.0.44. Did not make any difference to the issues seen in zed or the opencode cli.
Author
Owner

@rekram1-node commented on GitHub (Nov 7, 2025):

@vanneszias my bad I think i mixed up your issue and another one.

So for yours do you have some proxy or anything that would be blocking network calls?

@rekram1-node commented on GitHub (Nov 7, 2025): @vanneszias my bad I think i mixed up your issue and another one. So for yours do you have some proxy or anything that would be blocking network calls?
Author
Owner

@jacobdalamb commented on GitHub (Nov 8, 2025):

I just installed open code and ran opencode auth login and got this BunInstallFailedError

@jacobdalamb commented on GitHub (Nov 8, 2025): I just installed open code and ran `opencode auth login` and got this `BunInstallFailedError`
Author
Owner

@rekram1-node commented on GitHub (Nov 8, 2025):

@jacobdalamb do u have any proxy setup? im wondering what would be causing this

@rekram1-node commented on GitHub (Nov 8, 2025): @jacobdalamb do u have any proxy setup? im wondering what would be causing this
Author
Owner

@jacobdalamb commented on GitHub (Nov 8, 2025):

@rekram1-node no, I do not

edit: nevermind I found the issue. I have a global MINIMUM_RELEASE_AGE set inside Bun config

@jacobdalamb commented on GitHub (Nov 8, 2025): @rekram1-node no, I do not edit: nevermind I found the issue. I have a global `MINIMUM_RELEASE_AGE` set inside Bun config
Author
Owner

@vanneszias commented on GitHub (Nov 8, 2025):

@rekram1-node i also thought that couldve been the issue but didnt think i had any weird network configs. i tried by switching wifi to my iphone's hotspot and manually switched to cloudflare's dns 1.1.1.1, didn't make a difference.
i just figured it out tho: i was still connected to ethernet, so switching to wifi never could've made a difference. still dont know why it didnt launch the first time using ethernet tho... propably some filter on my home network.

it's fixed! i only had to launch it once for the first time without any weird network configs, and now i can launch it even using ethernet.

@vanneszias commented on GitHub (Nov 8, 2025): @rekram1-node i also thought that couldve been the issue but didnt think i had any weird network configs. i tried by switching wifi to my iphone's hotspot and manually switched to cloudflare's dns 1.1.1.1, didn't make a difference. i just figured it out tho: i was still connected to ethernet, so switching to wifi never could've made a difference. still dont know why it didnt launch the first time using ethernet tho... propably some filter on my home network. *it's fixed!* i only had to launch it once for the first time without any weird network configs, and now i can launch it even using ethernet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2674