Repository navigation
BunInstallFailedError for opencode-antigravity-auth@1.2.8 - Dependency conflict with zod versions #9075
Description
Bug Report: BunInstallFailedError for opencode-antigravity-auth@1.2.8
Summary
OpenCode v1.1.25 fails to start with BunInstallFailedError for plugin opencode-antigravity-auth@1.2.8 due to unresolvable dependency conflicts between the plugin's dependencies (zod@^3.24.0) and OpenCode's core dependencies (zod@4.1.8).
Environment
- OpenCode Version: 1.1.25
- Operating System: macOS (Darwin 25.2.0) ARM64
- Package Manager: Bun v1.3.5
- Installation Method: Official install script (
curl -fsSL https://opencode.ai/install | bash) - Plugin: opencode-antigravity-auth@1.2.8
Steps to Reproduce
- Install OpenCode using the official script:
curl -fsSL https://opencode.ai/install | bash - Run
opencodefrom any directory - Error occurs immediately on startup
Expected Behavior
OpenCode should start and run without errors, with the opencode-antigravity-auth plugin properly loaded.
Actual Behavior
OpenCode fails with the following error:
{
"name": "BunInstallFailedError",
"data": {
"pkg": "opencode-antigravity-auth",
"version": "1.2.8"
}
}Root Cause Analysis
The issue is caused by a dependency version conflict:
- OpenCode binary (v1.1.25) has
opencode-antigravity-auth@1.2.8hardcoded internally - Dependency Conflict:
@opencode-ai/plugin@1.1.25requires:zod@4.1.8opencode-antigravity-auth@1.2.8requires:zod@^3.24.0
- Automatic Installation: OpenCode binary automatically runs
bun installon every startup, which createsbun.lockfiles that cause conflicts - Version Incompatibility: The zod v3.x and v4.x are major version breaking changes and cannot be resolved simultaneously in the same dependency tree
Investigation Details
Attempted Solutions (all failed):
- ✅ Complete removal and reinstallation of OpenCode
- ✅ Manual installation of
opencode-antigravity-auth@1.2.8in~/.opencode/ - ✅ Installing both zod versions (3.24.0 and 4.1.8)
- ✅ Removing
bun.lockfiles (temporarily fixes, but recreates on next run) - ✅ Creating project-local
.opencodedirectories with explicit version pinning
Verification:
# Plugin is available on npm
$ npm view opencode-antigravity-auth versions --json
# Shows: "1.2.8" is available
# Dependency conflict confirmed
$ cat ~/.opencode/node_modules/@opencode-ai/plugin/package.json | grep zod
"zod": "4.1.8"
$ cat ~/.opencode/node_modules/opencode-antigravity-auth/package.json | grep zod
"zod": "^3.24.0"Workaround (Partial)
The only working solution is:
- Create
.opencodedirectory in project folder with:{ "dependencies": { "@opencode-ai/plugin": "1.1.25", "opencode-antigravity-auth": "1.2.8" } } - Run
bun installin.opencodedirectory - Delete
bun.lock(critical step) - Only works when running
opencodefrom that specific project directory
Limitation: Does not work from ~ or other directories, making OpenCode unusable globally.
Possible Solutions
Option 1: Update OpenCode Binary
Recompile OpenCode v1.1.25 with opencode-antigravity-auth@1.3.0 (if compatible) or find a version that doesn't have zod conflicts.
Option 2: Update Plugin Dependencies
Request opencode-antigravity-auth maintainer to update to zod@4.x to match OpenCode's requirements.
Option 3: Make Plugin Optional
Allow OpenCode to start even when plugin installation fails, with a warning instead of a hard error.
Option 4: Dependency Resolution
Improve OpenCode's dependency resolution to handle multiple major versions of zod (if possible with Bun's capabilities).
Additional Information
- The hardcoded version
1.2.8in the binary suggests this is a compiled-in dependency that cannot be easily changed by users - The plugin repository:
https://github.com/NoeFabris/opencode-antigravity-auth - The plugin is essential for Google OAuth authentication (Gemini 3 Pro and Claude 4.5 access)
Impact
Severity: High - Makes OpenCode completely unusable for users who need Google authentication
Affected Users: Anyone using OpenCode v1.1.25 with the opencode-antigravity-auth plugin
Suggested Priority
This should be treated as a blocking issue since it prevents the application from starting at all.
Activity
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.