Can't open opencode after install
Description
Seems opencode does not work well in the company network, after installing opencode via npm, it can't be opened.
PS D:\src\github-src\claude-code-inspector> npm i -g opencode-ai@latest
added 3 packages in 15s
PS D:\src\github-src\claude-code-check> opencode
{
"name": "BunInstallFailedError",
"data": {
"pkg": "opencode-copilot-auth",
"version": "0.0.8"
}
}
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows terminal
This issue might be a duplicate of existing issues. Please check:
- #2992: opencode fails to start after chocolatey install: HTTPThread: the CA is invalid
- #3130: SSL_CERT_FILE env not observed since v0.15.0
- #3566: error: SELF_SIGNED_CERT_IN_CHAIN
- #3426: BunInstallFailedError at Runtime on MacOS (company network environment)
- #3989: acp-command unhandled rejection (company proxy issues)
All of these involve BunInstallFailedError occurring when trying to install plugins in network-restricted environments (corporate proxies, firewalls, etc.). The core issue appears to be that OpenCode cannot properly download and install the opencode-copilot-auth plugin due to network/certificate restrictions.
Feel free to ignore if your specific case differs from these existing reports.
@chouzz set: OPENCODE_DISABLE_DEFAULT_PLUGINS=true and then try again
Hi, @rekram1-node! I have same issue. Could you clarify how should I set OPENCODE_DISABLE_DEFAULT_PLUGINS=false? As env variable?
This does not help:
❯ OPENCODE_DISABLE_DEFAULT_PLUGINS=false opencode
{
"name": "BunInstallFailedError",
"data": {
"pkg": "opencode-copilot-auth",
"version": "0.0.8"
}
}
You will want OPENCODE_DISABLE_DEFAULT_PLUGINS=1 opencode
similar issue here https://github.com/sst/opencode/issues/3426
Whoops I meant to say true (1 works too ofc)
I was tired my bad
You will want
OPENCODE_DISABLE_DEFAULT_PLUGINS=1 opencodesimilar issue here #3426
Works good for me.
This works but it errors out with externel plugins as well. Meaning using OPENCODE_DISABLE_DEFAULT_PLUGINS=1 opencode with the following configuration snippet will still cause it to fail.
...
"plugin": ["opencode-openai-codex-auth@@4.0.2", "opencode-gemini-auth"],
...
Removing the plugins fixes it but then you loose access to the plugins.
Upgrading to newer OpenCode versions solved the problem for me. Note: in my case it was not fresh install
I see, I tried updating to version 1.0.143. Still having the issue.
UPDATE: I could fix it by removing a root level .npmrc file.
Longer explanation:
Tried bun add --force --exact --cwd ~/.cache/opencode [email protected], which gave me
$ bun add --force --exact --cwd ~/.cache/opencode [email protected]
bun add v1.3.2 (b131639c)
error: ConnectionRefused downloading package manifest opencode-copilot-auth
Which led me to a similar issue here: https://github.com/oven-sh/bun/issues/4988#issuecomment-2660869480
I didn't try the IPV6 fix but it might also help :)