Error: cannot find module opencode-copilot-auth #2221

Open
opened 2026-02-16 17:34:43 -05:00 by yindo · 12 comments
Owner

Originally created by @621625 on GitHub (Oct 22, 2025).

Originally assigned to: @rekram1-node on GitHub.

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.

Originally created by @621625 on GitHub (Oct 22, 2025). Originally assigned to: @rekram1-node on GitHub. 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.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 22, 2025):

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] commented on GitHub (Oct 22, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Oct 22, 2025):

@bitcoinmeetups can you run:

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

@rekram1-node commented on GitHub (Oct 22, 2025): @bitcoinmeetups can you run: `cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls`
Author
Owner

@621625 commented on GitHub (Oct 25, 2025):

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

@621625 commented on GitHub (Oct 25, 2025): [bm@localhost ~]$ cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls /home/bm/.cache/opencode node_modules (1) └── opencode-copilot-auth@0.0.3 [bm@localhost opencode]$
Author
Owner

@rekram1-node commented on GitHub (Oct 25, 2025):

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

@rekram1-node commented on GitHub (Oct 25, 2025): hm it seems to be installed, are you still getting this error?
Author
Owner

@621625 commented on GitHub (Oct 26, 2025):

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 commented on GitHub (Oct 26, 2025): 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.
Author
Owner

@supastishn commented on GitHub (Oct 28, 2025):

Same with me /home/supastishn/.cache/opencode node_modules (14)
├── opencode-anthropic-auth@0.0.2
└── opencode-copilot-auth@0.0.3

@supastishn commented on GitHub (Oct 28, 2025): Same with me /home/supastishn/.cache/opencode node_modules (14) ├── opencode-anthropic-auth@0.0.2 └── opencode-copilot-auth@0.0.3
Author
Owner

@honzakostejn commented on GitHub (Nov 7, 2025):

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 commented on GitHub (Nov 7, 2025): 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
Author
Owner

@621625 commented on GitHub (Nov 29, 2025):

This did not resolve the issue for me.

@621625 commented on GitHub (Nov 29, 2025): This did not resolve the issue for me.
Author
Owner

@rekram1-node commented on GitHub (Nov 29, 2025):

what version of opencode are u on

@rekram1-node commented on GitHub (Nov 29, 2025): what version of opencode are u on
Author
Owner

@621625 commented on GitHub (Nov 29, 2025):

0.15.13

Termux - Archlinux

@621625 commented on GitHub (Nov 29, 2025): 0.15.13 Termux - Archlinux
Author
Owner

@621625 commented on GitHub (Nov 29, 2025):

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

@621625 commented on GitHub (Nov 29, 2025): It would also be nice if opencode worked on vanilla Termux but be prepared for many new users in that case.
Author
Owner

@rekram1-node commented on GitHub (Nov 29, 2025):

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

OPENCODE_DISABLE_DEFAULT_PLUGINS=true

@rekram1-node commented on GitHub (Nov 29, 2025): @bitcoinmeetups upgrade your opencode to latest and run with this flag: OPENCODE_DISABLE_DEFAULT_PLUGINS=true
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2221