Skip to content

Plugin install ignores scoped registries from ~/.npmrc and fetches from registry.npmjs.org #21123

@ghost91-

Description

@ghost91-

Description

Installing a plugin from a scoped private npm registry no longer respects scoped registry settings from ~/.npmrc.
For example, with:

@scope:registry=https://private-registry.example.com/

running:

opencode plugin --global @scope/plugin-name@latest

tries to fetch the package from https://registry.npmjs.org/... instead of the scoped registry and fails with a 404.

This looks like a regression introduced in v1.3.14. v1.3.13 does not include PR #18308 (replace BunProc with Npm module using @npmcli/arborist), while v1.3.14 does.

Plugins

None

OpenCode version

1.3.14 / 1.3.15

Steps to reproduce

  1. Add a scoped registry to ~/.npmrc, for example:
    @scope:registry=https://private-registry.example.com/
    
  2. Make sure a plugin package exists in that private registry, for example @scope/plugin-name.
  3. Run:
    opencode plugin --global @scope/plugin-name@latest
    
  4. Observe that OpenCode requests the package from registry.npmjs.org instead of the scoped registry and fails.

Example error:

Could not install "@scope/plugin-name@latest"
404 Not Found - GET https://registry.npmjs.org/@scope%2fplugin-name - Not found

Screenshot and/or share link

No response

Operating System

Arch Linux (irrelevant)

Terminal

Alacritty (irrelevant)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions