Skip to content

opencode v1.3.8 #101

Closed
Closed

Description

@ninjoan

Description

Can anyone report is this is working in v1.3.8

Steps to reproduce

Connect a provider

Operating system

macOS

Plugin version

lastest

OpenCode version

1.3.8

Debug logs

Activity

  1. elee1766 commented on Mar 30, 2026

    @elee1766
    Contributor

    its not working on 1.3.8 , it fails to load.

    i think this caused it: anomalyco/opencode@fa95a61

    the error is service=plugin path=opencode-claude-auth error=Plugin opencode-claude-auth resolved server entry outside plugin directory failed to resolve plugin server entry

  2. cowboycodr commented on Mar 30, 2026

    @cowboycodr

    Taking a look at this myself.

  3. elee1766 commented on Mar 30, 2026

    @elee1766
    Contributor

    ok so it seems just need to add server fields to package.json to make things work.

    "./server": {                                                                                                                                                         
      "types": "./dist/index.d.ts",                                                                                                                                       
      "import": "./opencode-claude-auth.js"                                                                                                                               
    } 
    

    something like this?

  4. cowboycodr commented on Mar 30, 2026

    @cowboycodr

    Yeah, from what I can tell that looks like the right direction.

    OpenCode 1.3.8 seems to resolve server plugins via exports["./server"] or main, and this package currently has main: "opencode-claude-auth.js" without the ./ prefix. That appears to be what triggers the "resolved server entry outside plugin directory" error.

    So adding an explicit ./server export like you showed seems reasonable. It may also need main/module normalized to ./opencode-claude-auth.js to avoid the same resolver issue.

  5. elee1766 commented on Mar 30, 2026

    @elee1766
    Contributor

    i added that snippet i pasted (the "server" entrypoint) to the installed package in my ~/.cache/opencode/node_modules/opencode-claude-auth/package.json and it works now so ya.

    add this to your "exports" section:

    "./server": {                                                                                                                                                         
      "types": "./dist/index.d.ts",                                                                                                                                       
      "import": "./opencode-claude-auth.js"                                                                                                                               
    } 
    

    this funny one liner should work for most people ymmv just have jq on your system

    cd ~/.cache/opencode/node_modules/opencode-claude-auth && jq '.exports["./server"] = .exports["."]' package.json > tmp.json && mv tmp.json package.json
    
  6. mbalajew commented on Mar 30, 2026

    @mbalajew

    I added that snippet and it works for me as well.

  7. griffinmartin commented on Mar 30, 2026

    @griffinmartin
    Owner

    Thanks everyone, fix is going out now. 1.3.4
    #103

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions