Skip to content

npm-registry without ending slash breaks opencode #4490

@saidelike

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

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