Error #1795

Open
opened 2026-02-16 17:32:39 -05:00 by yindo · 15 comments
Owner

Originally created by @mochammadgregy on GitHub (Sep 22, 2025).

Originally assigned to: @thdxr on GitHub.

Error: Unexpected error, check log file at /root/.local/share/opencode/log/2025-09-22T150350.log for more details

Originally created by @mochammadgregy on GitHub (Sep 22, 2025). Originally assigned to: @thdxr on GitHub. Error: Unexpected error, check log file at /root/.local/share/opencode/log/2025-09-22T150350.log for more details
Author
Owner

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

Can you share the log? @mochammadgregy

@rekram1-node commented on GitHub (Sep 22, 2025): Can you share the log? @mochammadgregy
Author
Owner

@mochammadgregy commented on GitHub (Sep 22, 2025):

@rekram1-node here 🙏🏻

cat /root/.local/share/opencode/log/2025-09-22T150936.log
INFO 2025-09-22T15:09:36 +388ms service=default version=0.11.1 args=[] opencode
INFO 2025-09-22T15:09:36 +3ms service=project directory=/root fromDirectory
INFO 2025-09-22T15:09:36 +172ms service=config path=/root/.config/opencode/config.json loading
INFO 2025-09-22T15:09:36 +50ms service=config path=/root/.config/opencode/opencode.json loading
INFO 2025-09-22T15:09:36 +8ms service=config path=/root/.config/opencode/opencode.jsonc loading
INFO 2025-09-22T15:09:36 +28ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin
ERROR 2025-09-22T15:09:36 +12ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/index.js' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-copilot-auth referrer=/$bunfs/root/index.js importKind=import-statement fatal

@mochammadgregy commented on GitHub (Sep 22, 2025): @rekram1-node here 🙏🏻 ------------------------------------- cat /root/.local/share/opencode/log/2025-09-22T150936.log INFO 2025-09-22T15:09:36 +388ms service=default version=0.11.1 args=[] opencode INFO 2025-09-22T15:09:36 +3ms service=project directory=/root fromDirectory INFO 2025-09-22T15:09:36 +172ms service=config path=/root/.config/opencode/config.json loading INFO 2025-09-22T15:09:36 +50ms service=config path=/root/.config/opencode/opencode.json loading INFO 2025-09-22T15:09:36 +8ms service=config path=/root/.config/opencode/opencode.jsonc loading INFO 2025-09-22T15:09:36 +28ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin ERROR 2025-09-22T15:09:36 +12ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/index.js' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-copilot-auth referrer=/$bunfs/root/index.js importKind=import-statement fatal
Author
Owner

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

What happens if you:

rm -rf ~/.cache/opencode

and try again

@rekram1-node commented on GitHub (Sep 22, 2025): What happens if you: rm -rf ~/.cache/opencode and try again
Author
Owner

@mochammadgregy commented on GitHub (Sep 22, 2025):

@rekram1-node I tried to fix this using AI coder but it still kept giving errors for an hour and I saw that AI did your suggestion, edited this and that until reinstalling using several methods, it was still the same.

@mochammadgregy commented on GitHub (Sep 22, 2025): @rekram1-node I tried to fix this using AI coder but it still kept giving errors for an hour and I saw that AI did your suggestion, edited this and that until reinstalling using several methods, it was still the same.
Author
Owner

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

@mochammadgregy what do you see if you run:

cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls
@rekram1-node commented on GitHub (Sep 22, 2025): @mochammadgregy what do you see if you run: ``` cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls ```
Author
Owner

@mochammadgregy commented on GitHub (Sep 22, 2025):

@rekram1-node

cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls
/root/.cache/opencode node_modules (1)
└── opencode-copilot-auth@0.0.2

@mochammadgregy commented on GitHub (Sep 22, 2025): @rekram1-node --------------------------- cd ~/.cache/opencode && BUN_BE_BUN=1 opencode pm ls /root/.cache/opencode node_modules (1) └── opencode-copilot-auth@0.0.2
Author
Owner

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

@mochammadgregy can you do:

cd ~/.cache/opencode && BUN_BE_BUN=1 opencode install opencode-copilot-auth@0.0.2

and then restart opencode maybe?

@rekram1-node commented on GitHub (Sep 22, 2025): @mochammadgregy can you do: ``` cd ~/.cache/opencode && BUN_BE_BUN=1 opencode install opencode-copilot-auth@0.0.2 ``` and then restart opencode maybe?
Author
Owner

@mochammadgregy commented on GitHub (Sep 22, 2025):

╭─ ~/.cache/opencode ✔ │ root@localhost │ 23:18:06

╰─ cd ~/.cache/opencode && BUN_BE_BUN=1 opencode install opencode-copilot-auth@0.0.2

bun add v1.2.21 (7c45ed97)

 

installed opencode-copilot-auth@0.0.2

 

1 package installed [21.00ms]

 

╭─ ~/.cache/opencode ✔ │ root@localhost │ 23:18:12

╰─ opencode

Error: Unexpected error, check log file at /root/.local/share/opencode/log/2025-09-22T231818.log for more details

 

╭─ ~/.cache/opencode 1 х │ root@localhost │ 23:18:18

╰─ cat /root/.local/share/opencode/log/2025-09-22T231818.log

INFO 2025-09-22T23:18:18 +315ms service=default version=0.11.1 args=[] opencode

INFO 2025-09-22T23:18:18 +2ms service=project directory=/root/.cache/opencode fromDirectory

INFO 2025-09-22T23:18:18 +59ms service=config path=/root/.config/opencode/config.json loading

INFO 2025-09-22T23:18:18 +1ms service=config path=/root/.config/opencode/opencode.json loading

INFO 2025-09-22T23:18:18 +1ms service=config path=/root/.config/opencode/opencode.jsonc loading

INFO 2025-09-22T23:18:18 +54ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin

ERROR 2025-09-22T23:18:18 +21ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/index.js' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-copilot-auth referrer=/$bunfs/root/index.js importKind=import-statement fatal

@rekram1-node

@mochammadgregy commented on GitHub (Sep 22, 2025): ╭─ ~/.cache/opencode ✔ │ root@localhost │ 23:18:06 ╰─ cd ~/.cache/opencode && BUN_BE_BUN=1 opencode install opencode-copilot-auth@0.0.2 bun add v1.2.21 (7c45ed97)   installed opencode-copilot-auth@0.0.2   1 package installed [21.00ms]   ╭─ ~/.cache/opencode ✔ │ root@localhost │ 23:18:12 ╰─ opencode Error: Unexpected error, check log file at /root/.local/share/opencode/log/2025-09-22T231818.log for more details   ╭─ ~/.cache/opencode 1 х │ root@localhost │ 23:18:18 ╰─ cat /root/.local/share/opencode/log/2025-09-22T231818.log INFO 2025-09-22T23:18:18 +315ms service=default version=0.11.1 args=[] opencode INFO 2025-09-22T23:18:18 +2ms service=project directory=/root/.cache/opencode fromDirectory INFO 2025-09-22T23:18:18 +59ms service=config path=/root/.config/opencode/config.json loading INFO 2025-09-22T23:18:18 +1ms service=config path=/root/.config/opencode/opencode.json loading INFO 2025-09-22T23:18:18 +1ms service=config path=/root/.config/opencode/opencode.jsonc loading INFO 2025-09-22T23:18:18 +54ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin ERROR 2025-09-22T23:18:18 +21ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/index.js' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-copilot-auth referrer=/$bunfs/root/index.js importKind=import-statement fatal @rekram1-node
Author
Owner

@mochammadgregy commented on GitHub (Sep 23, 2025):

@rekram1-node Opencode fix.txt

@mochammadgregy commented on GitHub (Sep 23, 2025): @rekram1-node ![Opencode fix.txt](https://github.com/user-attachments/files/22487700/Opencode.fix.txt)
Author
Owner

@rekram1-node commented on GitHub (Sep 23, 2025):

@mochammadgregy so you got it fixed?

@rekram1-node commented on GitHub (Sep 23, 2025): @mochammadgregy so you got it fixed?
Author
Owner

@mochammadgregy commented on GitHub (Sep 23, 2025):

@rekram1-node At first it worked and when I tried it it worked smoothly but when I logged out and logged back in the problem came back 😮‍💨

@mochammadgregy commented on GitHub (Sep 23, 2025): @rekram1-node At first it worked and when I tried it it worked smoothly but when I logged out and logged back in the problem came back 😮‍💨
Author
Owner

@rekram1-node commented on GitHub (Sep 23, 2025):

Logged out and back into your computer? @mochammadgregy is this a permissions issue then? That's what it seems like...

How did you install opencode

@rekram1-node commented on GitHub (Sep 23, 2025): Logged out and back into your computer? @mochammadgregy is this a permissions issue then? That's what it seems like... How did you install opencode
Author
Owner

@mochammadgregy commented on GitHub (Sep 23, 2025):

@rekram1-node
this happened because I used Termux and then I installed the Debian Proot distro on Android. Maybe this happened because the environment was not supportive and later I will try to find a solution. if I find it I will provide the solution here .

@mochammadgregy commented on GitHub (Sep 23, 2025): @rekram1-node this happened because I used Termux and then I installed the Debian Proot distro on Android. Maybe this happened because the environment was not supportive and later I will try to find a solution. if I find it I will provide the solution here .
Author
Owner

@rekram1-node commented on GitHub (Sep 23, 2025):

@mochammadgregy did you install with npm?

another idea:

delete opencode and reinstall using something else

@rekram1-node commented on GitHub (Sep 23, 2025): @mochammadgregy did you install with npm? another idea: delete opencode and reinstall using something else
Author
Owner

@pulpo commented on GitHub (Oct 6, 2025):

I found a way to have it working...

  1. Downloaded opencode zip from releases (the linux-arm64 version)
  2. I took the bin, and moved it inside a directory inside a bin path
  3. Tried to start opencode, it will failed telling that some module do not exists
  4. Went to the ~/.cache/opencode directory and removed the node_modules
  5. Disabled bin-links (that's is why I think the modules are not really found, directories were created but kept empy), for that I used npm config set bin-links false
  6. Did an npm install
  7. Went to some directory with code, and launched opencode, with success

I will be testing this approach and will let you know if I found a better way.

@pulpo commented on GitHub (Oct 6, 2025): I found a way to have it working... 1. Downloaded opencode zip from releases (the linux-arm64 version) 2. I took the bin, and moved it inside a directory inside a bin path 3. Tried to start opencode, it will failed telling that some module do not exists 4. Went to the ~/.cache/opencode directory and removed the node_modules 5. Disabled bin-links (that's is why I think the modules are not really found, directories were created but kept empy), for that I used `npm config set bin-links false` 6. Did an `npm install` 7. Went to some directory with code, and launched opencode, with success I will be testing this approach and will let you know if I found a better way.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1795