Skip to content

BunInstallFailedError for opencode-antigravity-auth@1.2.8 - Dependency conflict with zod versions #9075

Closed

Description

@ideas24h

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

  1. Install OpenCode using the official script:
    curl -fsSL https://opencode.ai/install | bash
  2. Run opencode from any directory
  3. 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:

  1. OpenCode binary (v1.1.25) has opencode-antigravity-auth@1.2.8 hardcoded internally
  2. Dependency Conflict:
    • @opencode-ai/plugin@1.1.25 requires: zod@4.1.8
    • opencode-antigravity-auth@1.2.8 requires: zod@^3.24.0
  3. Automatic Installation: OpenCode binary automatically runs bun install on every startup, which creates bun.lock files that cause conflicts
  4. 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):

  1. ✅ Complete removal and reinstallation of OpenCode
  2. ✅ Manual installation of opencode-antigravity-auth@1.2.8 in ~/.opencode/
  3. ✅ Installing both zod versions (3.24.0 and 4.1.8)
  4. ✅ Removing bun.lock files (temporarily fixes, but recreates on next run)
  5. ✅ Creating project-local .opencode directories 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:

  1. Create .opencode directory in project folder with:
    {
      "dependencies": {
        "@opencode-ai/plugin": "1.1.25",
        "opencode-antigravity-auth": "1.2.8"
      }
    }
  2. Run bun install in .opencode directory
  3. Delete bun.lock (critical step)
  4. Only works when running opencode from 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.8 in 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

  1. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions