Skip to content

How to reinstall npm dependencies #758

Closed

Description

@cravenceiling

I ran rm -rf ~/.cache/opencode and then in the same directory:

λ opencode ls
models.json  package.json  tui
λ opencode npm i
npm error code ETARGET
npm error notarget No matching version found for @openrouter/ai-sdk-provider@beta.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

So, how can I install the dependencies again, just reinstalling the app? This is the content of package.json

{
  "dependencies": {
    "@openrouter/ai-sdk-provider": "beta"
  }
}

opencode v0.2.5

Activity

  1. thdxr commented on Jul 9, 2025

    @thdxr
    Member

    hm we shouldn't be using that package at all - do you have config somewhere pointing to that package?

  2. self-assigned this
    on Jul 9, 2025
  3. cravenceiling commented on Jul 9, 2025

    @cravenceiling
    ContributorAuthor

    I don't think so.

  4. lhjt commented on Jul 10, 2025

    @lhjt

    I have also just installed opencode and I am trying to use a custom provider, but it keeps setting the version to @beta (like this issue) - is there a way to disable this or specify the version of the package to use?

  5. lhjt commented on Jul 10, 2025

    @lhjt

    I found the line and it appears it is being forced here:

    https://github.com/sst/opencode/blob/085c0e4e2b8518d740f75372367a44d19b22f90e/packages/opencode/src/provider/provider.ts#L361

    Would the way to fix this be to allow versions to be specified in the npm key and be used instead of forcing beta?

  6. daemonfire300 commented on Jul 10, 2025

    @daemonfire300

    hm we shouldn't be using that package at all - do you have config somewhere pointing to that package?

    It's from the documentation: https://opencode.ai/docs/models/#custom (if you mean just the package name and not the version)

  7. daemonfire300 commented on Jul 10, 2025

    @daemonfire300

    So the fix is to just not use that line, i.e., drop the npm entry. At least now I get a response from openrouter.

  8. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

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