Repository navigation
Description
Description
Description
After updating OpenCode Desktop to Electron-based version 1.14.39, npm plugins fail to load. The sidecar's background dependency installer resolves the host-provided package @opencode-ai/plugin as @opencode-ai/plugin@local and fails because that version doesn't exist on npm.
Steps to reproduce
- Fresh opencode config with any npm plugin that has
@opencode-ai/pluginas a peer dependency:
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tarquinen/opencode-dcp"]
}- Restart OpenCode Desktop
- Check
~/.local/share/opencode/log/
Actual behavior
Plugin fails to load with two cascade errors:
WARN service=config dir=~/.config/opencode
error=Cause([Fail(NpmInstallFailedError
(cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])
background dependency install failed
ERROR service=plugin path=@tarquinen/opencode-dcp
target=file:///.../packages/@tarquinen/opencode-dcp@latest/node_modules/.../dist/index.js
error=Cannot find module '.../dist/lib/config' imported from ...dist/index.js
failed to load plugin
Expected behavior
@opencode-ai/plugin is provided by the opencode host (it's a peer dependency of plugins). The sidecar should NOT attempt to install it from npm — it should be treated as an external/host-provided module during dependency resolution.
Root cause analysis
- The sidecar's dependency installer walks the plugin's dependency tree
- It encounters
@opencode-ai/plugin(peerDependency:>=1.2.0) - Instead of treating it as a host-provided external, it resolves it as
@opencode-ai/plugin@local @opencode-ai/plugin@localdoesn't exist as an npm dist-tag → install fails- Without its dependencies installed, the plugin's internal imports (
dist/lib/config, etc.) also fail
The same NpmInstallFailedError appears for both config directories (~/.config/opencode and ~/.opencode), suggesting it's a systemic resolution issue.
Additional note
The plugin is resolved to packages/@tarquinen/opencode-dcp@latest/ — the @latest suffix is added by the sidecar even when not specified in config.
Environment
- OpenCode Desktop: 1.14.39 (Electron)
- OS: macOS 15.7.2 (arm64)
- Bun: 1.3.13
- Node: 22.22.2
- Plugin: @tarquinen/[email protected] (peerDep: @opencode-ai/plugin >=1.2.0)
ISSUE
Title: Electron sidecar: npm plugins fail to load — peer dep @opencode-ai/plugin resolves as @Local
Description
After updating OpenCode Desktop to Electron-based version 1.14.39, npm plugins fail to load. The sidecar's background dependency installer resolves the host-provided package @opencode-ai/plugin as @opencode-ai/plugin@local and fails because that version doesn't exist on npm.
Steps to reproduce
- Fresh opencode config with any npm plugin that has
@opencode-ai/pluginas a peer dependency:
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tarquinen/opencode-dcp"]
}- Restart OpenCode Desktop
- Check
~/.local/share/opencode/log/
Actual behavior
Plugin fails to load with two cascade errors:
WARN service=config dir=~/.config/opencode
error=Cause([Fail(NpmInstallFailedError
(cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])
background dependency install failed
ERROR service=plugin path=@tarquinen/opencode-dcp
target=file:///.../packages/@tarquinen/opencode-dcp@latest/node_modules/.../dist/index.js
error=Cannot find module '.../dist/lib/config' imported from ...dist/index.js
failed to load plugin
Expected behavior
@opencode-ai/plugin is provided by the opencode host (it's a peer dependency of plugins). The sidecar should NOT attempt to install it from npm — it should be treated as an external/host-provided module during dependency resolution.
Root cause analysis
- The sidecar's dependency installer walks the plugin's dependency tree
- It encounters
@opencode-ai/plugin(peerDependency:>=1.2.0) - Instead of treating it as a host-provided external, it resolves it as
@opencode-ai/plugin@local @opencode-ai/plugin@localdoesn't exist as an npm dist-tag → install fails- Without its dependencies installed, the plugin's internal imports (
dist/lib/config, etc.) also fail
The same NpmInstallFailedError appears for both config directories (~/.config/opencode and ~/.opencode), suggesting it's a systemic resolution issue.
Additional note
The plugin is resolved to packages/@tarquinen/opencode-dcp@latest/ — the @latest suffix is added by the sidecar even when not specified in config.
Environment
- OpenCode Desktop: 1.14.39 (Electron)
- OS: macOS 15.7.2 (arm64)
- Bun: 1.3.13
- Node: 22.22.2
- Plugin: @tarquinen/[email protected] (peerDep: @opencode-ai/plugin >=1.2.0)
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Activity
github-actions commentedon May 6, 2026
This issue might be a duplicate of existing issues. Please check:
@opencode-ai/plugin@local, which fails becauselocalis not a published npm dist-tag. That issue also includes a detailed root cause analysis pointing to the missingOPENCODE_VERSIONdefine in the Node server build used by the Electron Desktop.github-actions commentedon Jul 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.