Closed
Labels
Description
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
Activity
[-]Opencode install breaks npm certificates on MacOS[/-][+]Opencode install with brew breaks npm certificates on MacOS[/+]dwickersheim commentedon 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-logsI 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