opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Error: cannot find module opencode-copilot-auth

Open 621625 opened this issue 3 months ago • 12 comments

Hi guys,

Hope you are well.

Getting this error message:

[root@localhost bm]# opencode Error: Unexpected error, check log file at /root/.local/share/opencode/log/2025-10-22T082018.log for more details

error: Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/index.js' [root@localhost bm]#

Not sure how to fix this. Tried installing with curl, npm, bun and paru. It seemed to work once almost but some server issue. Got to the TUI screen. But after that I can't even get that far.

Env: Arch emulator.

621625 avatar Oct 22 '25 08:10 621625

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

  • #2341: Same "Cannot find module opencode-copilot-auth" error with identical module resolution failure

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

github-actions[bot] avatar Oct 22 '25 08:10 github-actions[bot]

@bitcoinmeetups can you run:

cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls

rekram1-node avatar Oct 22 '25 14:10 rekram1-node

[bm@localhost ~]$ cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls /home/bm/.cache/opencode node_modules (1) └── [email protected] [bm@localhost opencode]$

621625 avatar Oct 25 '25 06:10 621625

hm it seems to be installed, are you still getting this error?

rekram1-node avatar Oct 25 '25 20:10 rekram1-node

Yes and I think there is another thread full of people with a similar issue. Now Arch in Termux is a very very hostile environment because as you know Android phones are blocked by the corporations so there are many things that you can't do with them. But if we could get opencode running on Termux that would still open up opportunities too and increase the user base.

621625 avatar Oct 26 '25 05:10 621625

Same with me /home/supastishn/.cache/opencode node_modules (14) ├── [email protected] └── [email protected]

supastishn avatar Oct 29 '25 02:10 supastishn

Faced the same issue on nix-on-droid (nix flavoured fork of Termux). I've used the flake to add the package. Then I was getting this error.

What fixed the issue in my case was to remove all node_modules from the opencode's cache and reinstall them with npm install.

See: https://github.com/sst/opencode/issues/2341#issuecomment-3502867060

honzakostejn avatar Nov 07 '25 14:11 honzakostejn

This did not resolve the issue for me.

621625 avatar Nov 29 '25 05:11 621625

what version of opencode are u on

rekram1-node avatar Nov 29 '25 05:11 rekram1-node

0.15.13

Termux - Archlinux

621625 avatar Nov 29 '25 06:11 621625

It would also be nice if opencode worked on vanilla Termux but be prepared for many new users in that case.

621625 avatar Nov 29 '25 06:11 621625

@bitcoinmeetups upgrade your opencode to latest and run with this flag:

OPENCODE_DISABLE_DEFAULT_PLUGINS=true

rekram1-node avatar Nov 29 '25 06:11 rekram1-node