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
{{ message }}
Repository navigation
opencode crashes at startup on FreeBSD: Cannot find module '@ff-labs/fff-bun' #48658
Building/running opencode from source on FreeBSD crashes at startup. bun install itself succeeds (Bun skips platform-mismatched optional deps), but @ff-labs/fff-bun declares "os": ["darwin", "linux", "win32"], so on FreeBSD Bun resolves it in the lockfile but never extracts it to node_modules. The static import in packages/core/src/filesystem/fff.bun.ts then throws and the CLI dies before doing anything.
OpenCode version
dev (1.18.30)
Steps to reproduce
On FreeBSD, install Bun and clone the repo
bun install (succeeds, but @ff-labs/fff-bun is not extracted)
bun run --cwd packages/opencode ./src/index.ts --version
Thanks for the detailed report and the root-cause analysis!
You're building packages/opencode at version 1.18.30, which is OpenCode v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround on supported platforms), so this is unlikely to be fixed there. We recommend moving to v2 (2.x, the @opencode/cli package). On the current dev branch the CLI is in packages/cli, so from source you'd run something like bun install && bun run --cwd packages/cli ./src/index.ts --version.
v2 may behave the same way: packages/core/src/filesystem/fff.bun.ts on dev still imports @ff-labs/fff-bun statically, and that package only targets darwin/linux/win32. If you can try v2 on FreeBSD and it also crashes with Cannot find module '@ff-labs/fff-bun', please reply here with the v2 version and the full output, and we'll look at it as a v2 issue. Also reply if you think this is critical for v1.
Closing this as not planned. The crash was reported on a v1 build (1.18.30, packages/opencode), and v1 only gets critical fixes. We haven't heard whether it also happens on v2.
If you try v2 on FreeBSD (packages/cli on dev) and it also fails with Cannot find module '@ff-labs/fff-bun', please open a new issue or comment here with the v2 version and the full output, and we'll take another look. Thanks again for the clear write-up!
Activity
asomers commentedon Oct 20, 2026
I cannot reproduce with OpenCode v2.0.32 on FreeBSD 15.1 .
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and the root-cause analysis!
You're building
packages/opencodeat version 1.18.30, which is OpenCode v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround on supported platforms), so this is unlikely to be fixed there. We recommend moving to v2 (2.x, the@opencode/clipackage). On the currentdevbranch the CLI is inpackages/cli, so from source you'd run something likebun install && bun run --cwd packages/cli ./src/index.ts --version.v2 may behave the same way:
packages/core/src/filesystem/fff.bun.tsondevstill imports@ff-labs/fff-bunstatically, and that package only targets darwin/linux/win32. If you can try v2 on FreeBSD and it also crashes withCannot find module '@ff-labs/fff-bun', please reply here with the v2 version and the full output, and we'll look at it as a v2 issue. Also reply if you think this is critical for v1.opencodejr commentedon Oct 29, 2026
Closing this as not planned. The crash was reported on a v1 build (1.18.30,
packages/opencode), and v1 only gets critical fixes. We haven't heard whether it also happens on v2.If you try v2 on FreeBSD (
packages/cliondev) and it also fails withCannot find module '@ff-labs/fff-bun', please open a new issue or comment here with the v2 version and the full output, and we'll take another look. Thanks again for the clear write-up!