You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Background "npm install @opencode-ai/plugin@local" fails on every project dir — OPENCODE_VERSION not injected in packaged build (Desktop v1.18.1) #37806
Every project directory OpenCode scans triggers a background npm install @opencode-ai/plugin@<version>
(intended to make the plugin SDK available for that project's local .opencode/ agents/commands).
On the packaged Desktop build (v1.18.1, Windows), this always fails with:
NpmInstallFailedError: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local
Root cause (traced in app.asar)
InstallationVersion=typeofOPENCODE_VERSION==="string" ? OPENCODE_VERSION : "local";InstallationChannel="prod";InstallationLocal=InstallationChannel==="local";// always false in this build
...
version: InstallationLocal ? undefined : InstallationVersion
OPENCODE_VERSION is meant to be substituted with a real version string at build time, but isn't in
this build — it falls through to the literal string "local", which isn't a valid npm dist-tag, so the
install 404s every time.
Impact
Cosmetic but noisy: fires as a logWarning, not a thrown error, so it doesn't block config/plugin
loading — but it repeats for every open project directory on every restart (13+ times in one session
across 5 project dirs), and appears to be one of the triggers for the generic
"Session error / An error occurred" toast (notification.session.error.fallbackDescription), since
that's the app's catch-all for any unhandled session-level error.
Workaround attempted (didn't work)
Pre-seeded a package.json in the affected directory with @opencode-ai/plugin pinned to a real,
already-installed version (1.17.3), hoping the installer would see it as already satisfied. It still
failed identically — the install call appears to run unconditionally rather than checking the existing
package.json first.
Fix
Ensure OPENCODE_VERSION is properly injected as the real app version string at build time for the
packaged Desktop release, instead of falling through to the "local" placeholder.
All of these report the same underlying issue: OPENCODE_VERSION not being substituted at build time, causing the app to use @local as the npm version specifier, which does not exist on the registry.
Activity
github-actions commentedon Jul 19, 2026
This issue might be a duplicate of existing issues. Please check:
All of these report the same underlying issue:
OPENCODE_VERSIONnot being substituted at build time, causing the app to use@localas the npm version specifier, which does not exist on the registry.github-actions commentedon Sep 19, 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.