DashboardopencodeOpenCode compiled-binary build prerequi…

OpenCode compiled-binary build prerequisites

Category: gotcha
Confidence: 1.00
ID: 01a086aa-bc6b-7cb8-b4cf-691c0b788b30
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 2
Source session: (none)
Created: 2026-06-09 13:20:47
Updated: 2026-09-09 14:55:31

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 5 2d ago
Code 1 2026-06-14

Content

Compiled OpenCode binaries require the OPENCODE_MIGRATIONS build define containing serialized migration SQL. Without it, import.meta.dirname resolves under /$bunfs/root, migration lookup targets nonexistent /$bunfs/migration, and the TUI crashes with ENOENT. Stable and development binary scripts must set the define. Node binary builds also require Bun ^1.4.2; installing a newer Bun elsewhere is insufficient if the invoking shell still resolves an older runtime. Invoke the intended Bun binary directly or prepend its directory to PATH, then verify bun --version in the exact build command environment.

Move to: