Skip to content

MacOS 15.5 not running npm i #735

Closed
Closed

Description

@pixqc

Ran brew install sst/tap/opencode, ran opencode, opencode errored out and asked me to check logs

ERROR 2025-07-07T05:54:29 +1ms service=default name=ResolveMessage message=Cannot find module '/Users/pix/.cache/opencode/node_modules/@aws-sdk/credential-providers' from '/$bunfs/root/opencode' code=ERR_MODULE_NOT_FOUND specifier=/Users/pix/.cache/opencode/node_modules/@aws-sdk/credential-providers referrer=/$bunfs/root/opencode importKind=import-statement fatal

~/.cache/opencode contained models.json and package.json. Ran npm i on it and opencode . works.

MacOS 15.5, opencode v0.1.194

Activity

  1. self-assigned this
    on Jul 7, 2025
  2. rkunnamp commented on Jul 7, 2025

    @rkunnamp

    encountered the same error . Sonnet suggested the following in packages/opencode/src/provider/provider.ts

    -const mod = await import(await BunProc.install(pkg, "latest"))
    +const mod = await import(await BunProc.install(pkg, "latest")).catch(async () => {
    +// Fallback: try importing by package name instead of path
    +return await import(pkg)
    +})

  3. gitfudge0 commented on Jul 11, 2025

    @gitfudge0

    +1 for not finding @aws-sdk/credential-providers

  4. franklintarter commented on Jul 11, 2025

    @franklintarter

    +1 didn't have a package.json in my ~/.cache/opencode either after clear cache and fresh install. had to npm init and npm i @ai-sdk/anthropic@beta in the cache folder. MacOS, opencode version = 0.2.30

  5. 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!

  6. added 2 commits that reference this issue on Apr 7, 2026
    0c7deb2
    95e606f
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