Opencode install with brew breaks npm certificates on MacOS #3057

Open
opened 2026-02-16 17:38:24 -05:00 by yindo · 1 comment
Owner

Originally created by @MadOrkestra on GitHub (Nov 22, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Still trying to replicate when and how this happens, but maybe this helps someone in the meantime: installing opencode with brew install opencode on MacOS (with former npm install present) breaks the npm registry certificates resulting in this, when you run npm install:

npm error code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm error errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY

Happened to me twice now, once with an old opencode install before 1.x, just now again with 1.099 - the fix is surprisingly uninstalling with brew uninstall opencode and then re-install it with brew again.

I am running node via nvm, maybe thats something to look into as source of this issue.

OpenCode version

1.099

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS Sequoia 15.7.2

Terminal

zsh

Originally created by @MadOrkestra on GitHub (Nov 22, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Still trying to replicate when and how this happens, but maybe this helps someone in the meantime: installing opencode with `brew install opencode` on MacOS (with former npm install present) breaks the npm registry certificates resulting in this, when you run `npm install`: `npm error code UNABLE_TO_GET_ISSUER_CERT_LOCALLY` `npm error errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY` Happened to me twice now, once with an old opencode install before 1.x, just now again with 1.099 - the fix is surprisingly uninstalling with `brew uninstall opencode` and then re-install it with brew again. I am running node via nvm, maybe thats something to look into as source of this issue. ### OpenCode version 1.099 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOS Sequoia 15.7.2 ### Terminal zsh
yindo added the help-wantedbug labels 2026-02-16 17:38:24 -05:00
Author
Owner

@dwickersheim commented on GitHub (Dec 18, 2025):

I experienced a similar issue. On Windows 11, I attempted to install opencode by running npm in PowerShell. The install failed. After digging around, I found my npm and node were very old. Once I updated them (node 24.12.0, npm 11.6.2), I was able to get opencode (1.0.167) to install. When I ran opencode and tried a simple prompt "Tell me a joke about bears". I got an error UNABLE_TO_GET_ISSUER_CERT_LOCALLY.

I did an uninstall and reinstall of opencode using npm. Now I am able to using the same prompt without getting an error.

Spoke too soon.

Ran opencode run hello --print-logs

I get the following in the output

error: unable to get local issuer certificate
path: "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-pc-windows-msvc.zip",
errno: 0,
code: "UNABLE_TO_GET_ISSUER_CERT_LOCALLY"

ERROR 2025-12-18T14:12:20 +1ms service=acp-command promise={} reason=unable to get local issuer certificate Unhandled rejection
ERROR 2025-12-18T14:12:20 +0ms service=default e=unable to get local issuer certificate rejection

@dwickersheim commented on GitHub (Dec 18, 2025): I experienced a similar issue. On Windows 11, I attempted to install opencode by running npm in PowerShell. The install failed. After digging around, I found my npm and node were very old. Once I updated them (node 24.12.0, npm 11.6.2), I was able to get opencode (1.0.167) to install. When I ran opencode and tried a simple prompt "Tell me a joke about bears". I got an error `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`. I did an uninstall and reinstall of opencode using npm. Now I am able to using the same prompt without getting an error. Spoke too soon. Ran ` opencode run hello --print-logs` I get the following in the output error: unable to get local issuer certificate path: "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-pc-windows-msvc.zip", errno: 0, code: "UNABLE_TO_GET_ISSUER_CERT_LOCALLY" ERROR 2025-12-18T14:12:20 +1ms service=acp-command promise={} reason=unable to get local issuer certificate Unhandled rejection ERROR 2025-12-18T14:12:20 +0ms service=default e=unable to get local issuer certificate rejection
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3057