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
v2: Plugin from git url - NPM + BUN conflict error #49785
I get an error from NPM being in conflict with BUN (it seems to me)
NpmInstallFailedError:
at catch (B:/~BUN/root/chunk-3kgbfgap.js:3:9450)
at ~effect/Utils/internal (B:/~BUN/root/chunk-a43cxxb8.js:8:1535)
at s (B:/~BUN/root/chunk-a43cxxb8.js:24:6055)
at processTicksAndRejections (native:7:39)
at Npm.reify (B:/~BUN/root/chunk-3kgbfgap.js:3:9497)
at Npm.add (B:/~BUN/root/chunk-7n9n93n5.js:1500:8385)
at Npm.add (definition) (B:/~BUN/root/chunk-3kgbfgap.js:3:9533)
at PluginSupervisor.load (B:/~BUN/root/chunk-7n9n93n5.js:1500:7787)
at PluginSupervisor.load (definition) (B:/~BUN/root/chunk-7n9n93n5.js:1500:8267)
at PluginSupervisor.resolve (B:/~BUN/root/chunk-7n9n93n5.js:1500:9317)
at PluginSupervisor.resolve (definition) (B:/~BUN/root/chunk-7n9n93n5.js:1500:7258)
at PluginSupervisor.activate (B:/~BUN/root/chunk-7n9n93n5.js:1500:9652)
at PluginSupervisor.activate (definition) (B:/~BUN/root/chunk-7n9n93n5.js:1500:9063)
at ServerProcess.start (B:/~BUN/root/chunk-shccbgfk.js:2:6330) {
[cause]: Error: git dep preparation failed
at vt (B:/~BUN/root/chunk-53kf4b4q.js:8:4483)
at processTicksAndRejections (unknown:7:39)
}
NodeJS is installed on the device, opencode2 is installed as global package on NodeJS.
Plugins
tickernelz/opencode-mem.git#opencode-api-v2
OpenCode version
opencode2 v0.0.0-beta-17823
Steps to reproduce
configure a plugin with a github path, as per bun/npm spec.
I think this is a duplicate of #49704. When a plugin is installed from a git URL, OpenCode uses npm's git fetcher internally. If the plugin's package.json has a build, prepare, prepack, install, preinstall or postinstall script, the fetcher runs an extra "preparation" install, and that step fails with exactly git dep preparation failed. The package.json on tickernelz/opencode-mem's main branch has both "build" and "prepare": "husky"; I couldn't read the opencode-api-v2 branch, but I expect it has the same scripts. Having Node/npm installed next to Bun shouldn't be what causes this.
Possible duplicates and related issues, most likely first:
Closing this as a duplicate of #49704, since there's been no reply in the past day. The git dep preparation failed error happens when a git-installed plugin's package.json has a build or prepare script. opencode-mem has both on its main branch, and I expect the opencode-api-v2 branch is the same. #59504 covers the Windows-specific side of the same failure. Until it's fixed, installing the plugin from npm or from a fork without those scripts should get around it. Please follow #49704 for the fix. If your problem turns out to be different, reply here and it can be reopened. Thanks for reporting!
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the report and the full stack trace!
I think this is a duplicate of #49704. When a plugin is installed from a git URL, OpenCode uses npm's git fetcher internally. If the plugin's
package.jsonhas abuild,prepare,prepack,install,preinstallorpostinstallscript, the fetcher runs an extra "preparation" install, and that step fails with exactlygit dep preparation failed. Thepackage.jsonontickernelz/opencode-mem'smainbranch has both"build"and"prepare": "husky"; I couldn't read theopencode-api-v2branch, but I expect it has the same scripts. Having Node/npm installed next to Bun shouldn't be what causes this.Possible duplicates and related issues, most likely first:
build/prepare/install-type script fail withgit dep preparation failed. Same error and same cause.npmeven when Node is installed.buildscript worked around it there.Until it's fixed, installing the plugin from npm (if a published version works for you), or from a fork without those scripts, should get around it.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencodejr commentedon Oct 29, 2026
Closing this as a duplicate of #49704, since there's been no reply in the past day. The
git dep preparation failederror happens when a git-installed plugin'spackage.jsonhas abuildorpreparescript. opencode-mem has both on itsmainbranch, and I expect theopencode-api-v2branch is the same. #59504 covers the Windows-specific side of the same failure. Until it's fixed, installing the plugin from npm or from a fork without those scripts should get around it. Please follow #49704 for the fix. If your problem turns out to be different, reply here and it can be reopened. Thanks for reporting!