Skip to content

Opencode install with brew breaks npm certificates on MacOS #4640

Closed

Description

@MadOrkestra

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

  1. changed the title [-]Opencode install breaks npm certificates on MacOS[/-] [+]Opencode install with brew breaks npm certificates on MacOS[/+] on Nov 22, 2025
  2. self-assigned this
    on Nov 22, 2025
  3. dwickersheim commented on Dec 18, 2025

    @dwickersheim

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions