Skip to content

Please add self-test on startup to find build/platform issues before model runs #1903

Closed

Description

@stevelr

Got this error:

Bash | ResolveMessage: Cannot find module '/$bunfs/root/../../../tree-sitter-d8jpqavy.node' from '/$bunfs/root/opencode'

on NixOS on aarch64 using opencode v0.4.40

The cli appeared to start fine, and I was able to auth, enter a key, and select a model (Gemini 2.5 pro). The model could read files but the error only showed up when the model tried to run simple bash commands like mkdir.

I tried clearing the cache folder and restarting, but got the same error.

opencode hey says Hey there. What would you like help with today? If you have a task in mind, tell me what you want to build or fix.

It's possible that this issue has to do with the build script for nixos: I used the most recent nixpkgs script and updated the git version and hashes to v0.4.40. (on NixOS binary installers that depend on .so shared libraries don't work.)

There are two different problems: The symptom, which may be some combination of build script/tree-sitter/aarch64, and one that to some may be more important: the need for a self-test to discover potential problems like this during startup, instead of after the model has burned tokens reading and digesting material, and only failing when it tries to perform actions. I burned about $9 yesterday trying to work-around this issue before giving up.

I don't know anything about bun packaging but if you can point me toward a build script - or a way to make a static binary, I could test a fix on a free model.

Activity

  1. github-actions commented on Aug 13, 2025

    @github-actions
    Contributor

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

    The tree-sitter module loading error appears to be a known issue affecting multiple platforms and architectures. The self-test functionality you're requesting would indeed help catch these issues before model execution.

    If none of these address your specific case, please let us know how this issue differs.

  2. stevelr commented on Aug 13, 2025

    @stevelr
    Author

    yes bot I read those before filing this. Issue 1454 said it was going to be fixed in 0.3.90 but the script I used was for 0.4.1, and 1454 didn't link to a git diff that I could check against. The other issues & PRs I read said that either (a) the problem manifested when starting opencode, where for me it didn't appear until much later, or (b) were fixed by clearing cache, which I tried but it didn't resolve the issue.
    There is an open PR related to aarch64 and tree-sitter, so I know that's being worked on. In this issue I tried to emphasize the need for a startup self-test

  3. TheSirC commented on Sep 12, 2025

    @TheSirC

    I concur. I am on NixOS as well and was hit by the issue today when the agent tried to run a Bash command.

  4. rekram1-node commented on Sep 12, 2025

    @rekram1-node
    Collaborator

    @TheSirC what version are you on? I know bun had a bug that affected Nix but I think it should be fixed on latest

  5. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Collaborator

    [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