You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no it doesnt mean you can’t authenticate it just means occasionally an error will happen and you may have to send a message twice until Dax fixes it, when I say twice I dont mean literally type it out twice itd be more like:
I just resolved a similar module-not-found error by deleting everything and reinstall using npm. Reinstall using bun from scratch does not resolve the error. I suspect it this might have to do with mixup of npm and bun - but i am not familiar with both so this is a pure speculation. I am behind a coporate proxy and bun's support of proxy does not seem to work consistently (It hangs installing missing modules reported by opencode). I suspect that might be the culprit (oven-sh/bun#1440).
I just resolved a similar module-not-found error by deleting everything and reinstall using npm. Reinstall using bun from scratch does not resolve the error. I suspect it this might have to do with mixup of npm and bun - but i am not familiar with both so this is a pure speculation. I am behind a coporate proxy and bun's support of proxy does not seem to work consistently (It hangs installing missing modules reported by opencode). I suspect that might be the culprit (oven-sh/bun#1440).
Hello,
Hope you are well.
What is the process to delete everything? I also kind of which there were an uninstall flag or something that uninstalls and purges everything.
I just resolved a similar module-not-found error by deleting everything and reinstall using npm. Reinstall using bun from scratch does not resolve the error. I suspect it this might have to do with mixup of npm and bun - but i am not familiar with both so this is a pure speculation. I am behind a coporate proxy and bun's support of proxy does not seem to work consistently (It hangs installing missing modules reported by opencode). I suspect that might be the culprit (oven-sh/bun#1440).
This did't worked for me. getting same error. On version [v1.0.143]
I just resolved a similar module-not-found error by deleting everything and reinstall using npm. Reinstall using bun from scratch does not resolve the error. I suspect it this might have to do with mixup of npm and bun - but i am not familiar with both so this is a pure speculation. I am behind a coporate proxy and bun's support of proxy does not seem to work consistently (It hangs installing missing modules reported by opencode). I suspect that might be the culprit (oven-sh/bun#1440).
I can confirm this did the trick for me as well.
cd ~/.cache/opencode
rm -rf ./node_modules
npm install
opencode auth login
I had a similar issue, I wanted to use the new GHE support, but I didn't get to the prompt to input the .ghe.com domain, it would just hang on the bun command as it printed int the logs. I found this in another GH issues and that worked for me:
I had a similar issue, I wanted to use the new GHE support, but I didn't get to the prompt to input the .ghe.com domain, it would just hang on the bun command as it printed int the logs. I found this in another GH issues and that worked for me:
rm ~/.bun/install/cache -rf
Confirming that deleting the bun cache worked for me too.
Activity
github-actions commentedon Aug 31, 2025
This issue might be a duplicate of existing issues. Please check:
npm i#735: MacOS 15.5 not runningnpm i- Same ERR_MODULE_NOT_FOUND pattern, resolved by running npm i in cache directoryFeel free to ignore if none of these address your specific case.
Lain-droid commentedon Aug 31, 2025
INFO 2025-08-31T11:30:58 +422ms service=default version=0.5.29 args=[] opencode
INFO 2025-08-31T11:30:58 +2ms service=app cwd=/root creating
INFO 2025-08-31T11:30:58 +13ms service=app git
INFO 2025-08-31T11:30:58 +4ms service=app name=plugin registering service
INFO 2025-08-31T11:30:58 +3ms service=app name=config registering service
INFO 2025-08-31T11:30:58 +6ms service=config path=/root/.config/opencode/config.json loading
INFO 2025-08-31T11:30:58 +2ms service=config path=/root/.config/opencode/opencode.json loading
INFO 2025-08-31T11:30:58 +11ms service=config path=/root/.config/opencode/opencode.jsonc loading
INFO 2025-08-31T11:30:58 +135ms service=config agent={} mode={} command={} plugin=[] username=root loaded
INFO 2025-08-31T11:30:58 +0ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin
INFO 2025-08-31T11:30:58 +1ms service=bun pkg=opencode-copilot-auth version=0.0.2 installing package using Bun's default registry resolution
INFO 2025-08-31T11:30:58 +1ms service=bun cmd=["/root/.opencode/bin/opencode","add","--force","--exact","--cwd","/root/.cache/opencode","opencode-copilot-auth@0.0.2"] cwd=/root/.cache/opencode running
INFO 2025-08-31T11:30:59 +580ms service=bun code=0 stdout=bun add v1.2.19 (aad3abea)
installed opencode-copilot-auth@0.0.2
14 packages installed [465.00ms]
stderr=Saved lockfile
done
ERROR 2025-08-31T11:30:59 +20ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/opencode' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-copilot-auth referrer=/$bunfs/root/opencode importKind=import-statement fatal
root@localhost:~#
rekram1-node commentedon Aug 31, 2025
what happens if you do:
rm -rf ~/.cache/opencode
and then try again
pulpo commentedon Aug 31, 2025
@Lain-droid same issue here, in a proot environment under termux...
Lain-droid commentedon Sep 1, 2025
Yeah its proot too
pulpo commentedon Sep 1, 2025
I tried with the latest version (0.6.0), also deleting the .cache/opencode, an the problem is still present.
rekram1-node commentedon Sep 1, 2025
I mentioned this to Dax yesterday so I think he is looking into it
HavardPede commentedon Sep 4, 2025
Im also encountering this issue, on version 0.6.4
fkukuck commentedon Sep 8, 2025
Does this mean you cannot authenticate with GitHub at the moment? Can you confirm? I'm scared to update opencode since I use it with GitHub
rekram1-node commentedon Sep 8, 2025
no it doesnt mean you can’t authenticate it just means occasionally an error will happen and you may have to send a message twice until Dax fixes it, when I say twice I dont mean literally type it out twice itd be more like:
works
supastishn commentedon Sep 13, 2025
INFO 2025-09-13T19:26:28 +907ms service=default version=0.7.9 args=["auth","login"] opencode INFO 2025-09-13T19:26:28 +1ms service=project directory=/home/supastishn fromDirectory INFO 2025-09-13T19:26:28 +168ms service=models.dev file={} refreshing INFO 2025-09-13T19:26:28 +520ms service=models.dev file
={} refreshing INFO 2025-09-13T19:26:46 +17593ms service=config path=/home/supastishn/.config/opencode/config.json loading INFO 2025-09-13T19:26:46 +2ms service=config path=/home/supastishn/.config/opencode/opencode.json loading INFO 2025-09-13T19:26:46 +2ms service=config path=/home/supastishn/.config/opencode/opencode.jsonc loading INFO 2025-09-13T19:26:46 +123ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin INFO 2025-09-13T19:26:46 +22ms service=bun pkg=opencode-copilot-auth version=0.0.2 installing package using Bun's default registry resolution INFO 2025-09-13T19:26:46 +5ms service=bun cmd=["/home/supastishn/node_modules/opencode-linux-arm64/bin/opencode","add","--force","--exact","--cwd","/home/supastishn/.cache/opencode","opencode-copilot-auth@0.0.2"] cwd=/home/supastishn/.cache/opencode running INFO 2025-09-13T19:26:46 +131ms service=bun code=0 stdout=bun add v1.2.21 (7c45ed97) installed opencode-copilot-auth@0.0.2
1 package installed [51.00ms]
stderr=Saved lockfile
done
ERROR 2025-09-13T19:26:46 +8ms service=default name=Reso
lveMessage message=Cannot find module '/home/supastishn/
.cache/opencode/node_modules/opencode-copilot-auth' from
'/$bunfs/root/index.js' code=ERR_MODULE_NOT_FOUND speci
fier=/home/supastishn/.cache/opencode/node_modules/openc
ode-copilot-auth referrer=/$bunfs/root/index.js importKi
nd=import-statement fatal
im getting the error when i run opencode auth login, even without using github copilot provider. tried deleting cache to no svsil
rekram1-node commentedon Sep 13, 2025
@supastishn what do u see if you run:
yungchinghsiao commentedon Oct 18, 2025
I just resolved a similar module-not-found error by deleting everything and reinstall using npm. Reinstall using bun from scratch does not resolve the error. I suspect it this might have to do with mixup of npm and bun - but i am not familiar with both so this is a pure speculation. I am behind a coporate proxy and bun's support of proxy does not seem to work consistently (It hangs installing missing modules reported by opencode). I suspect that might be the culprit (oven-sh/bun#1440).
gabrieldebem commentedon Oct 20, 2025
im having a similar error here in my 15.5 macos
I’m getting a similar error on macOS 15.5 — looks like
GET https://npm.pkg.github.com/opencode-copilot-auth
doesn’t exist (404).
rekram1-node commentedon Oct 20, 2025
@gabrieldebem can you do:
rm -rf ~/.cache/opencodethen run:
opencode run hello --print-logs621625 commentedon Oct 22, 2025
Hi rekram1-node,
Hope you are well.
Same issue. Your input gives:
[root@localhost ~]# rm -rf ~/.cache/opencode [root@localhost ~]# opencode run hello --print-logs INFO 2025-10-22T08:30:00 +23481ms service=default version=0.1
5.13 args=["run","hello","--print-logs"] opencode INFO 2025-10-22T08:30:00 +5ms service=project directory=/root fromDirectory INFO 2025-10-22T08:30:00 +159ms service=config path=/root/.config/opencode/config.json loading INFO 2025-10-22T08:30:00 +11ms service=config path=/root/.config/opencode/opencode.json loading INFO 2025-10-22T08:30:00 +1ms service=config path=/root/.config/opencode/opencode.jsonc loading INFO 2025-10-22T08:30:00 +23ms service=bun cmd=["/root/.openc
ode/bin/opencode","add","@opencode-ai/plugin@0.15.13","--exact
"] cwd=/root/.config/opencode running
INFO 2025-10-22T08:30:00 +43ms service=bun cmd=["/root/.openc
ode/bin/opencode","add","@opencode-ai/plugin@0.15.13","--exact
"] cwd=/root/.opencode running
INFO 2025-10-22T08:30:00 +58ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca) installed @opencode-ai/plugin@0.15.13 Failed to install 1 package
[65.00ms] done
stderr=FileNotFound: failed copying files from cache to desti
nation for package @opencode-ai/sdk Saved lockfile
done ERROR 2025-10-22T08:30:00 +0ms service=default e=Command faile
d with exit code 1 rejection
INFO 2025-10-22T08:30:01 +275ms service=plugin path=opencode-
copilot-auth@0.0.3 loading plugin
INFO 2025-10-22T08:30:01 +11ms service=bun pkg=opencode-copil
ot-auth version=0.0.3 installing package using Bun's default r
egistry resolution
INFO 2025-10-22T08:30:01 +1ms service=bun cmd=["/root/.openc
ode/bin/opencode","add","@opencode-ai/plugin@0.15.13","--exact"] cwd=/root/.opencode running INFO 2025-10-22T08:30:00 +58ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca) installed @opencode-ai/plugin@0.15.13
Failed to install 1 package
[65.00ms] done
stderr=FileNotFound: failed copying files from cache to desti
nation for package @opencode-ai/sdk
Saved lockfile done ERROR 2025-10-22T08:30:00 +0ms service=default e=Command failed with exit code 1 rejection INFO 2025-10-22T08:30:01 +275ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin INFO 2025-10-22T08:30:01 +11ms service=bun pkg=opencode-copil
ot-auth version=0.0.3 installing package using Bun's default r
egistry resolution
INFO 2025-10-22T08:30:01 +1ms service=bun cmd=["/root/.openc$de/bin/opencode","add","--force","--exact","--cwd","/root/.cac
he/opencode","opencode-copilot-auth@0.0.3"] cwd=/root/.cache/o
pencode running INFO 2025-10-22T08:30:01 +211ms service=bun code=0 stdout=bun add v1.3.0 (b0a6feca) installed opencode-copilot-auth@0.0.3
1 package installed [82.00ms]
stderr=Saved lockfile
done
ERROR 2025-10-22T08:30:01 +45ms service=default name=ResolveMe
ssage message=Cannot find module '/root/.cache/opencode/node_m
odules/opencode-copilot-auth' from '/$bunfs/root/index.js' cod
e=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_mo
dules/opencode-copilot-auth referrer=/$bunfs/root/index.js imp
ortKind=import-statement fatal
Error: Unexpected error, check log file at for more details
error: Cannot find module '/root/.cache/opencode/node_modules/
opencode-copilot-auth' from '/$bunfs/root/index.js'
INFO 2025-10-22T08:30:01 +587ms service=bun code=0 stdout=bun
add v1.3.0 (b0a6feca)
installed @opencode-ai/plugin@0.15.13
3 packages installed [1154.00ms]
stderr=Saved lockfile
done
[root@localhost ~]#
621625 commentedon Oct 22, 2025
Hello,
Hope you are well.
What is the process to delete everything? I also kind of which there were an uninstall flag or something that uninstalls and purges everything.
honzakostejn commentedon Nov 7, 2025
I can confirm this did the trick for me as well.
ajinkyaT commentedon Dec 11, 2025
This did't worked for me. getting same error. On version [v1.0.143]
rekram1-node commentedon Dec 11, 2025
@ajinkyaT do you need copilot auth? If not set this env var:
OPENCODE_DISABLE_DEFAULT_PLUGINS=1codemuse commentedon Dec 11, 2025
I had a similar issue, I wanted to use the new GHE support, but I didn't get to the prompt to input the .ghe.com domain, it would just hang on the bun command as it printed int the logs. I found this in another GH issues and that worked for me:
pbassut commentedon Dec 30, 2025
Confirming that deleting the bun cache worked for me too.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.