Unable to run opencode from source outside of packages/opencode directory on opentui branch #2131

Closed
opened 2026-02-16 17:34:18 -05:00 by yindo · 3 comments
Owner

Originally created by @kalvenschraut on GitHub (Oct 16, 2025).

Originally assigned to: @thdxr on GitHub.

There is no build available for alpine atm so I am force to clone the repo and just do
bun $HOME/opencode/packages/opencode/src/index.ts as an alias for opencode to start the UI where I want to run agents for. I swapped to the opentui branch due to perf issues I noticed on bigger monitors when full screened. Everything was working mostly great until I pulled in https://github.com/sst/opencode/commit/22f8c228 which now results running into the below error.

Image

This error occurs if running opencode in any directory that is not packages/opencode. Seems like the relative path is assuming its always going be ran from the opencode package, which may be fine if it is bundled into the binary but breaks the only way I have been able to run this on alpine.

So to replicate, checkout the opentui branch of this repo.
from the root do bun packages/opencode/src/index.ts and see the workers error. then do git checkout 22f8c228~ to see it work just fine

Originally created by @kalvenschraut on GitHub (Oct 16, 2025). Originally assigned to: @thdxr on GitHub. There is no build available for alpine atm so I am force to clone the repo and just do `bun $HOME/opencode/packages/opencode/src/index.ts` as an alias for opencode to start the UI where I want to run agents for. I swapped to the opentui branch due to perf issues I noticed on bigger monitors when full screened. Everything was working mostly great until I pulled in https://github.com/sst/opencode/commit/22f8c228 which now results running into the below error. <img width="1203" height="123" alt="Image" src="https://github.com/user-attachments/assets/25f78ca1-6eef-4667-8082-f84ee7a5acc4" /> This error occurs if running opencode in any directory that is not packages/opencode. Seems like the relative path is assuming its always going be ran from the opencode package, which may be fine if it is bundled into the binary but breaks the only way I have been able to run this on alpine. So to replicate, checkout the opentui branch of this repo. from the root do `bun packages/opencode/src/index.ts` and see the workers error. then do `git checkout 22f8c228~` to see it work just fine
yindo added the opentui label 2026-02-16 17:34:18 -05:00
yindo closed this issue 2026-02-16 17:34:18 -05:00
Author
Owner

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

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

  • #649: Similar Alpine Linux compatibility issue where user is forced to run from source using bun packages/opencode/src/index.ts due to binary compatibility issues with musl-based distros

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

@github-actions[bot] commented on GitHub (Oct 16, 2025): This issue might be a duplicate of existing issues. Please check: - #649: Similar Alpine Linux compatibility issue where user is forced to run from source using `bun packages/opencode/src/index.ts` due to binary compatibility issues with musl-based distros Feel free to ignore if none of these address your specific case.
Author
Owner

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

I have actually discovered another working way for alpine support and that is to just clone the repo, build the opencode package and run the linux-x64 bin file. Not sure if this is because it is built on an alpine system with only glibc available or some other reason 🤷 but allows me to use the latest opentui code now

@kalvenschraut commented on GitHub (Oct 28, 2025): I have actually discovered another working way for alpine support and that is to just clone the repo, build the opencode package and run the linux-x64 bin file. Not sure if this is because it is built on an alpine system with only glibc available or some other reason 🤷 but allows me to use the latest opentui code now
Author
Owner

@paralin commented on GitHub (Nov 4, 2025):

This is fixed now by #3922 and can be closed.

@paralin commented on GitHub (Nov 4, 2025): This is fixed now by #3922 and can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2131