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
@rekram1-node it does now. But that's what I normally do. I only added the debug and print logs arguments to debug and so I could post some meaningful information here
Sorry, for the confusion here. It actually doesn't work. installing with npm seems to give me a very old version (version=0.6.4) as it's since in the output above. After removing that and installing with bash it hangs again.
tons@p1 ~/I/d/docker-deployment (docs/monitoring-updates) [SIGINT]> opencode run hello --print-logs
INFO 2025-09-25T01:23:40 +91ms service=default version=0.11.3 args=["run","hello","--print-logs"] opencode
INFO 2025-09-25T01:23:40 +1ms service=project directory=/home/tons/IdeaProjects/dhis2/docker-deployment fromDirectory
INFO 2025-09-25T01:23:40 +14ms service=config path=/home/tons/.config/opencode/config.json loading
INFO 2025-09-25T01:23:40 +1ms service=config path=/home/tons/.config/opencode/opencode.json loading
INFO 2025-09-25T01:23:40 +0ms service=config path=/home/tons/.config/opencode/opencode.jsonc loading
INFO 2025-09-25T01:23:40 +1ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
INFO 2025-09-25T01:23:40 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO 2025-09-25T01:23:40 +13ms service=bus type=* subscribing
INFO 2025-09-25T01:23:40 +0ms service=bus type=session.updated subscribing
INFO 2025-09-25T01:23:40 +0ms service=bus type=message.updated subscribing
INFO 2025-09-25T01:23:40 +0ms service=bus type=message.part.updated subscribing
INFO 2025-09-25T01:23:40 +0ms service=format init
INFO 2025-09-25T01:23:40 +0ms service=bus type=file.edited subscribing
INFO 2025-09-25T01:23:40 +1ms service=session id=ses_68187f4abffeI0OjszpOZsXndQ version=0.11.3 projectID=af5076a5fa969b59bb429caca92e24545fbfc949 directory=/home/tons/IdeaProjects/dhis2/docker-deployment title=New session - 2025-09-25T01:23:40.500Z time={"created":1758763420500,"updated":1758763420500} created
INFO 2025-09-25T01:23:40 +0ms service=lsp serverIds=typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd, svelte, jdtls enabled LSP servers
INFO 2025-09-25T01:23:40 +1ms service=bus type=session.updated publishing
INFO 2025-09-25T01:23:40 +4ms service=bus type=message.part.updated subscribing
INFO 2025-09-25T01:23:40 +0ms service=bus type=session.error subscribing
INFO 2025-09-25T01:23:40 +1ms service=session.prompt session=ses_68187f4abffeI0OjszpOZsXndQ prompt
INFO 2025-09-25T01:23:40 +2ms service=bus type=message.updated publishing
INFO 2025-09-25T01:23:40 +0ms service=bus type=message.part.updated publishing
INFO 2025-09-25T01:23:40 +1ms service=bus type=session.updated publishing
INFO 2025-09-25T01:23:40 +2ms service=models.dev file={} refreshing
INFO 2025-09-25T01:23:40 +2ms service=provider init
INFO 2025-09-25T01:23:40 +1ms service=provider providerID=opencode found
INFO 2025-09-25T01:23:40 +0ms service=provider providerID=opencode modelID=grok-code getModel
INFO 2025-09-25T01:23:40 +0ms service=provider status=started providerID=opencode getSDK
INFO 2025-09-25T01:23:40 +0ms service=bun pkg=@ai-sdk/openai-compatible version=latest installing package using Bun's default registry resolution
INFO 2025-09-25T01:23:40 +1ms service=bun cmd=["/home/tons/.opencode/bin/opencode","add","--force","--exact","--cwd","/home/tons/.cache/opencode","@ai-sdk/openai-compatible@latest"] cwd=/home/tons/.cache/opencode running
Currently hanging there. And no, no special environment of any kind. Just my regular Lenovo P1 with Fedora. I also just want a speed test. I got about 350 Mbps up and down
I think it was just latency for installing the necessary package(s) to run opencode for you
Realistically on our end the only thing i see as a take away is having an installing indicator or something but it is pretty weird that it took so much time
I see the same problem on Rocky Linux.
It works once after fresh install and then it stops.
Interestingly enough the workaround I'm using is to go the ~/.cache/opencode a do:
rm -rf node_modules
npm install
After that opencode starts working correctly again.
Then I guess at some point (usually few days later) it gets an update and stops working again (with the same complaint - "Cannot find module './functions/valid'").
That is when I repeat the removal of node_modules followed by npm install and continue using it without any other issues.
I did use Opencode to analyze the opencode repo on then latest v1.1.39, and the conclusion is this:
The bun runtime is bundled within opencode, and it is 1.3.5. My machine was running 1.3.6. There could be format corruption somewhere happening.
The semver version need to be downloaded with a --exact to make sure the valid is there. I don't get the point since I was manually downloading the semver 7.7.3 tar ball to fix the js file, but anyway that also worked.
Nuke the cache and redownload usually would work. I tried, three times a charm. There is a short script provided. Feel free to use it but nothing safe guaranteed, and remember to match the lib versions in your env.
rm -rf /<your/home/dir>/.cache/opencode/*
rm -rf /<your/home/dir>/.bun/install/cache/*
cd /<your/home/dir>/.cache/opencode
bun add "@gitlab/opencode-gitlab-auth@1.3.2" "oh-my-opencode@3.1.7" "opencode-anthropic-auth@0.0.13" "semver@7.6.3" --exact
I'm not a fan of js. Is there anything like gradle in Java we can use for the dependency management?
Activity
github-actions commentedon Sep 24, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Sep 25, 2025
@tonsV2 what do you see if you do:
cat ~/.cache/opencode/node_modules/@ai-sdk/openai/package.json
what version is in here?
Does that even exist?
also try::
cat ~/.cache/opencode/package.json
tonsV2 commentedon Sep 25, 2025
@rekram1-node I get the below. I normally install using bash but since it stopped working I tried to install using npm
After letting opencode hang for longer period I get some more output.
I normally use yarn over npm but I don't recall setting it as default for anything and I guess it should work regardless.
tonsV2 commentedon Sep 25, 2025
After a very very long time it actually came up!
I'm now seeing that but something is definitely wrong.
Below is the complete output I got after exiting
rekram1-node commentedon Sep 25, 2025
@tonsV2 if you run without print logs flag it will work as expected
tonsV2 commentedon Sep 25, 2025
@rekram1-node it does now. But that's what I normally do. I only added the debug and print logs arguments to debug and so I could post some meaningful information here
tonsV2 commentedon Sep 25, 2025
Sorry, for the confusion here. It actually doesn't work. installing with npm seems to give me a very old version (version=0.6.4) as it's since in the output above. After removing that and installing with bash it hangs again.
tonsV2 commentedon Sep 25, 2025
It starts but nothing happens when I type input
rekram1-node commentedon Sep 25, 2025
what if you do:
opencode run hello --print-logs
^^
rekram1-node commentedon Sep 25, 2025
are you running in a special environment? seems weird that it takes so long to do anything, maybe poor internet?
tonsV2 commentedon Sep 25, 2025
Currently hanging there. And no, no special environment of any kind. Just my regular Lenovo P1 with Fedora. I also just want a speed test. I got about 350 Mbps up and down
rekram1-node commentedon Sep 25, 2025
weird that installs are taking forever ig you just need to wait it out so it can properly install that provider
ideally we would show something in ui here
tonsV2 commentedon Sep 25, 2025
It finally finished but that's all I got
rekram1-node commentedon Sep 25, 2025
does it work now? haha
tonsV2 commentedon Sep 25, 2025
Yes 🙂 Do you know what happened?
rekram1-node commentedon Sep 25, 2025
I think it was just latency for installing the necessary package(s) to run opencode for you
Realistically on our end the only thing i see as a take away is having an installing indicator or something but it is pretty weird that it took so much time
tonsV2 commentedon Sep 25, 2025
Thanks for the support here 🙏
yusu-netapp commentedon Jan 15, 2026
I'm into a situation that if I exited the opencode and the next time I open it it will hang, and the VSZ is so high
The log from
.local/share/opencode/logshows almost nothing:This is a linux VM. Any suggestions?
rekram1-node commentedon Jan 15, 2026
@yusu-netapp see above conversation, following steps there can help debug issue
yusu-netapp commentedon Jan 16, 2026
Sorry, I missed that one line of run hello part. The last few lines of the output is like this:
The weird part is that, it works once, then start to fail.
What should I do to restore this module?
roszakg commentedon Jan 31, 2026
I see the same problem on Rocky Linux.
It works once after fresh install and then it stops.
Interestingly enough the workaround I'm using is to go the ~/.cache/opencode a do:
After that opencode starts working correctly again.
Then I guess at some point (usually few days later) it gets an update and stops working again (with the same complaint - "Cannot find module './functions/valid'").
That is when I repeat the removal of node_modules followed by npm install and continue using it without any other issues.
yusu-netapp commentedon Feb 2, 2026
I did use Opencode to analyze the opencode repo on then latest v1.1.39, and the conclusion is this:
I'm not a fan of js. Is there anything like gradle in Java we can use for the dependency management?