-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Nix CLI build fails: missing packages/app dependencies for web UI embedding #19307
Copy link
Copy link
Closed
Closed
Copy link
Labels
Description
Description
The Nix CLI build (nix/opencode.nix) fails because build.ts embeds the web UI by default (bun run --cwd ${appDir} build), which invokes packages/app/node_modules/.bin/vite.
However, nix/node_modules.nix only installs dependencies for packages/opencode and packages/desktop:
bun install \
--filter '!./' \
--filter './packages/opencode' \
--filter './packages/desktop' \So packages/app/node_modules doesn't exist in the build sandbox — vite is missing entirely.
Root cause: nix/node_modules.nix is missing --filter './packages/app', and nix/opencode.nix is missing patchShebangs for packages/app/node_modules (like nix/desktop.nix already does for its own node_modules).
Suggested fix:
- Add
--filter './packages/app'tonix/node_modules.nixso app dependencies are available - Add
patchShebangs packages/app/node_modulesandnodejstonativeBuildInputsinnix/opencode.nix(same pattern asnix/desktop.nix)
OpenCode version
1.3.3 at rev 9a2482ac09c03d32d9331a84b8b8bd137301ead0
Steps to reproduce
nix build github:anomalyco/opencodeOperating System
NixOS / any Nix-based system (Linux x86_64)
/nix/store/.../bash: /build/source/packages/app/node_modules/.bin/vite: /usr/bin/env: bad interpreter: No such file or directory
error: script "build" exited with code 126
Reactions are currently unavailable