Skip to content

npm-registry without ending slash breaks opencode #4490

Closed

Description

@saidelike

Description

problem

with the below, opencode fails to work:

npm config set registry https://internal/example/to/npmjs-registry
$ opencode
Error: Unexpected error, check log file at /home/user/.local/share/opencode/log/2025-10-20T133525.log for more details

checking the log:

error: GET https://internal/example/to/@opencode-ai%2fplugin - 404

As you can see above, it is missing npmjs-registry as the address should be: https://internal/example/to/npmjs-registry/@opencode-ai%2fplugin

expected

opencode handles a npm registry without an ending slash and append one before looking up for npm packages.

current workaround

with the below, opencode works as expected:

npm config set registry https://internal/example/to/npmjs-registry/

OpenCode version

0.15.8

Steps to reproduce

See above

Screenshot and/or share link

No response

Operating System

Linux

Terminal

bash

Activity

  1. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Contributor

    @saidelike can you update to latest?

    opencode upgrade 1.0.78

  2. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Contributor

    /oc if you can find an easy fix for this then fix it please, look in bun/index.ts

  3. opencode-agent commented on Nov 20, 2025

    @opencode-agent
    Contributor

    Created PR #4520

    New%20session%20-%202025-11-20T00%3A40%3A49.946Z
    opencode session  |  github run

  4. saidelike commented on Nov 20, 2025

    @saidelike
    Author

    @saidelike can you update to latest?

    opencode upgrade 1.0.78

    Apologies but I am not using it right now so I can't test with latest. I meant to report the problem earlier but didn't have a chance. Hopefully it is easy to fix indeed!

  5. self-assigned this
    on Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions