Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

[Bug]: Cannot find module '@opencode-ai/plugin' from '.../opencode-google-antigravity-auth/src/plugin.ts' code=ERR_MODULE_NOT_FOUND  #5

Closed

Description

@esatgundogdu

Description

On openning opencode after adding the plugin to config, I got an error and opencode crashes.

Reproduction Steps

Steps to reproduce the behavior:

  1. Add the plugin to .config/opencode/opencode.json
  2. Type opencode auth login
  3. Select Google
  4. The error occurs

Expected Behavior

The auth option should be seen in Google authentication methods.

Actual Behavior

It gives error on selecting Google at opencode auth login menu.

Screenshots

Image

Environment

  • WSL2 Ubuntu 24.04

Opencode Information

  • Opencode cli
  • Config given in readme file of this repo.
  • Version: 1.0.164

Debug Information

INFO  2025-12-17T14:02:22 +316ms service=default version=1.0.164 args=["auth","login"] opencode

INFO  2025-12-17T14:02:22 +0ms service=default directory=/home/pc_4415 creating instance

INFO  2025-12-17T14:02:22 +1ms service=project directory=/home/pc_4415 fromDirectory

INFO  2025-12-17T14:02:22 +10ms service=models.dev file={} refreshing

INFO  2025-12-17T14:02:22 +321ms service=config path=/home/pc_4415/.config/opencode/config.json loading

INFO  2025-12-17T14:02:22 +0ms service=config path=/home/pc_4415/.config/opencode/opencode.json loading

INFO  2025-12-17T14:02:22 +4ms service=config path=/home/pc_4415/.config/opencode/opencode.jsonc loading

INFO  2025-12-17T14:02:22 +3ms service=bun cmd=["/home/pc_4415/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/home/pc_4415/.config/opencode running

INFO  2025-12-17T14:02:22 +1ms service=config path=/home/pc_4415/.opencode/opencode.jsonc loading

INFO  2025-12-17T14:02:22 +1ms service=config path=/home/pc_4415/.opencode/opencode.json loading

INFO  2025-12-17T14:02:22 +0ms service=bun cmd=["/home/pc_4415/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/home/pc_4415/.opencode running

INFO  2025-12-17T14:02:22 +2ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)



installed @opencode-ai/[email protected]



[2.00ms] done

 stderr=Saved lockfile

 done

INFO  2025-12-17T14:02:22 +2ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)



installed @opencode-ai/[email protected]



[1.00ms] done

 stderr=Saved lockfile

 done

INFO  2025-12-17T14:02:22 +4ms service=models.dev file={} refreshing

INFO  2025-12-17T14:02:24 +2112ms service=plugin path=opencode-google-antigravity-auth loading plugin

INFO  2025-12-17T14:02:24 +1ms service=bun pkg=opencode-google-antigravity-auth version=latest installing package using Bun's default registry resolution

INFO  2025-12-17T14:02:24 +0ms service=bun cmd=["/home/pc_4415/.opencode/bin/opencode","add","--force","--exact","--cwd","/home/pc_4415/.cache/opencode","opencode-google-antigravity-auth@latest"] cwd=/home/pc_4415/.cache/opencode running

INFO  2025-12-17T14:02:26 +1468ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)



installed [email protected]



26 packages installed [1465.00ms]

 stderr=Resolving dependencies

Resolved, downloaded and extracted [17]

Saved lockfile

 done

ERROR 2025-12-17T14:02:26 +22ms service=default name=ResolveMessage message=Cannot find module '@opencode-ai/plugin' from '/home/pc_4415/.cache/opencode/node_modules/opencode-google-antigravity-auth/src/plugin.ts' code=ERR_MODULE_NOT_FOUND specifier=@opencode-ai/plugin referrer=/home/pc_4415/.cache/opencode/node_modules/opencode-google-antigravity-auth/src/plugin.ts importKind=import-statement fatal

Activity

  1. changed the title [-][Bug]:[/-] [+][Bug]: Cannot find module '@opencode-ai/plugin' from '.../opencode-google-antigravity-auth/src/plugin.ts' code=ERR_MODULE_NOT_FOUND [/+] on Dec 17, 2025
  2. self-assigned this
    on Dec 17, 2025
  3. shekohex commented on Dec 17, 2025

    @shekohex
    Owner

    I will investigate this issue.

  4. shekohex commented on Dec 17, 2025

    @shekohex
    Owner

    just tried it on a fresh install on an Ubuntu box, no issues. Could you please clear the cache:

    rm -rf ~/.cache/opencode/node_modules/opencode-google-antigravity-auth
    

    then update the config and use [email protected]

    then start opencode again like the following:

    opencode serve --log-level DEBUG --port 4096 --print-logs
    

    and hit it with a curl request in another terminal tab:

    curl -s http://127.0.0.1:4096
    

    And watch the logs, attach it here if you still face the same issue.

  5. esatgundogdu commented on Dec 17, 2025

    @esatgundogdu
    Author

    same on Mac

    installed [email protected]

    26 packages installed [560.00ms]
    stderr=Resolving dependencies
    Resolved, downloaded and extracted [16]
    Saved lockfile
    done
    error: Cannot find module '@opencode-ai/plugin' from '/Users/esatgundogdu/.cache/opencode/node_modules/opencode-google-antigravity-auth/src/plugin.ts'
    GET - http://127.0.0.1:4096/ failed

  6. strotgen commented on Dec 17, 2025

    @strotgen

    just tried it on a fresh install on an Ubuntu box, no issues. Could you please clear the cache:

    rm -rf ~/.cache/opencode/node_modules/opencode-google-antigravity-auth
    

    then update the config and use [email protected]

    then start opencode again like the following:

    opencode serve --log-level DEBUG --port 4096 --print-logs
    

    and hit it with a curl request in another terminal tab:

    curl -s http://127.0.0.1:4096
    

    And watch the logs, attach it here if you still face the same issue.

    I am on Tahoe 26.1 (25B78) and I am facing the same issue. Tried the suggestions but still failing the same issue:

    INFO  2025-12-17T21:25:48 +489ms service=default version=1.0.163 args=["serve","--log-level","DEBUG","--port","4096","--print-logs"] opencode
    opencode server listening on http://127.0.0.1:4096
    INFO  2025-12-17T21:25:54 +5985ms service=server method=GET path=/ request
    INFO  2025-12-17T21:25:54 +0ms service=server status=started method=GET path=/ request
    INFO  2025-12-17T21:25:54 +1ms service=default directory=/x creating instance
    INFO  2025-12-17T21:25:54 +0ms service=project directory=/x fromDirectory
    INFO  2025-12-17T21:25:54 +6ms service=default directory=/x bootstrapping
    INFO  2025-12-17T21:25:54 +2ms service=config path=/Users/x/.config/opencode/config.json loading
    INFO  2025-12-17T21:25:54 +0ms service=config path=/Users/x/.config/opencode/opencode.json loading
    INFO  2025-12-17T21:25:54 +2ms service=config path=/Users/x/.config/opencode/opencode.jsonc loading
    INFO  2025-12-17T21:25:54 +1ms service=bun cmd=["/opt/homebrew/Cellar/opencode/1.0.163/libexec/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/x/.config/opencode running
    INFO  2025-12-17T21:25:54 +5ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)
    
    installed @opencode-ai/[email protected]
    
    [1.00ms] done
     stderr=Saved lockfile
     done
    INFO  2025-12-17T21:25:54 +2ms service=plugin path=opencode-google-antigravity-auth loading plugin
    INFO  2025-12-17T21:25:54 +1ms service=bun pkg=opencode-google-antigravity-auth version=latest installing package using Bun's default registry resolution
    INFO  2025-12-17T21:25:54 +0ms service=bun cmd=["/opt/homebrew/Cellar/opencode/1.0.163/libexec/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","add","--force","--exact","--cwd","/Users/x/.cache/opencode","opencode-google-antigravity-auth@latest"] cwd=/Users/x/.cache/opencode running
    INFO  2025-12-17T21:25:54 +135ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)
    
    + [email protected]
    + [email protected]
    
    installed [email protected]
    
    28 packages installed [130.00ms]
     stderr=Resolving dependencies
    Resolved, downloaded and extracted [1]
    Saved lockfile
     done
    error: Cannot find module '@opencode-ai/plugin' from '/Users/x/.cache/opencode/node_modules/opencode-google-antigravity-auth/src/plugin.ts'
    GET - http://127.0.0.1:4096/ failed
    
    
  7. shekohex commented on Dec 17, 2025

    @shekohex
    Owner

    @strotgen @esatgundogdu could you try 0.2.6? and see if that fixes the issue for you?

  8. strotgen commented on Dec 17, 2025

    @strotgen

    @strotgen @esatgundogdu could you try 0.2.6? and see if that fixes the issue for you?

    I don't get an error when running opencode server listening on http://127.0.0.1:4096 but the 'OAuth with Google (Antigravity)' provider doesn't appear on the list. And after running opencode . and quitting, I got this, but only one time.

    {
      "name": "BunInstallFailedError",
      "data": {
        "pkg": "opencode-google-antigravity-auth",
        "version": "latest"
      }
    }
  9. shekohex commented on Dec 18, 2025

    @shekohex
    Owner

    @strotgen @esatgundogdu could you try 0.2.6? and see if that fixes the issue for you?

    I don't get an error when running opencode server listening on http://127.0.0.1:4096 but the 'OAuth with Google (Antigravity)' provider doesn't appear on the list. And after running opencode . and quitting, I got this, but only one time.

    {
    "name": "BunInstallFailedError",
    "data": {
    "pkg": "opencode-google-antigravity-auth",
    "version": "latest"
    }
    }

    Could you try to share more logs? run the opencode serve --log-level DEBUG --port 4096 --print-logs command and the curl command to trigger full opencode reload and see if it works. please clean the download cache first:

    rm -rf ~/.cache/opencode/node_modules/opencode-google-antigravity-auth
    
  10. itzrnvr commented on Dec 18, 2025

    @itzrnvr

    I keep getting provider init error

    edit:
    nvm doing rm -rf ~/.local/share/opencode worked. Thanks.

  11. strotgen commented on Dec 18, 2025

    @strotgen

    Using rm -rf ~/.local/share/opencode also did the trick. Thanks for the help!

  12. shekohex commented on Dec 19, 2025

    @shekohex
    Owner

    Okay, closing this issue as completed.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions