Skip to content

[BUG] error: @ai-sdk/[email protected]@latest failed to resolve when starting opencode #2806

Closed

Description

@shekohex

I've installed the latest opencode v0.11.9 and when I start it I get this error (see the logs)

INFO  2025-09-26T17:58:50 +79ms service=default version=0.11.9 args=[] opencode
INFO  2025-09-26T17:58:50 +1ms service=project directory=/home/hakim/github/shekohex/openagent fromDirectory
INFO  2025-09-26T17:58:50 +11ms service=config path=/home/hakim/.config/opencode/config.json loading
INFO  2025-09-26T17:58:50 +0ms service=config path=/home/hakim/.config/opencode/opencode.json loading
INFO  2025-09-26T17:58:50 +6ms service=config path=/home/hakim/.config/opencode/opencode.jsonc loading
INFO  2025-09-26T17:58:50 +9ms service=plugin path=file:///home/hakim/.config/opencode/plugin/notification.ts loading plugin
INFO  2025-09-26T17:58:50 +0ms service=plugin path=file:///home/hakim/.config/opencode/plugin/env.ts loading plugin
INFO  2025-09-26T17:58:50 +1ms service=plugin [email protected] loading plugin
INFO  2025-09-26T17:58:50 +0ms service=bun pkg=opencode-copilot-auth version=0.0.3 installing package using Bun's default registry resolution
INFO  2025-09-26T17:58:50 +0ms service=bun cmd=["/home/hakim/.bun/install/global/node_modules/opencode-linux-x64/bin/opencode","add","--force","--exact","--cwd","/home/hakim/.cache/opencode","[email protected]"] cwd=/home/hakim/.cache/opencode running
INFO  2025-09-26T17:58:51 +752ms service=bun code=1 stdout=bun add v1.2.21 (7c45ed97)
 stderr=Resolving dependencies
Resolved, downloaded and extracted [4]
warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

error: GET https://registry.npmjs.org/@ai-sdk%[email protected] - 404
error: @ai-sdk/[email protected]@latest failed to resolve
 done
ERROR 2025-09-26T17:58:51 +4ms service=default pkg=opencode-copilot-auth version=0.0.3 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError
    at new NamedError (unknown:1:28)
    at new BunInstallFailedError (/$bunfs/root/index.js:60581:14)
    at <anonymous> (/$bunfs/root/index.js:61968:43)
    at processTicksAndRejections (native:7:39) fatal

By the way, this not an issue when I tried v0.11.2, so this issue is very recent.

Activity

  1. github-actions commented on Sep 26, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    The core issue appears to be dependency resolution failures when opencode tries to install the opencode-copilot-auth plugin, specifically when @ai-sdk/[email protected] cannot be resolved from the npm registry (404 error).

    Feel free to ignore if none of these address your specific case.

  2. shekohex commented on Sep 26, 2025

    @shekohex
    ContributorAuthor

    Running rm -rf ~/.cache/opencode solved the issue! Hope this helps anyone who has the same issue.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions