fix(steamdeck): run the web console with node, not bun (Nitro node-server preset)

The management console is a Nitro `node-server` build (per web/vite.config.ts) — it must be
run with `node`, not `bun`. Run under bun it 500s on every page render with
"Cannot find package 'srvx'": bun mis-resolves Nitro's externalized server deps from the
nested SSR chunk at request time. (This was pre-existing — the old manual pfweb.sh ran it
with bun too.)

- Provision `nodejs` in the pf2 distrobox; run the web service with `node .output/server/index.mjs`.
- Use `enable` + `restart` (not `enable --now`) so re-running the installer actually applies
  unit-file changes instead of no-opping against the running service.

Verified on the Deck: web `/login` now returns 200 (was 500), "Listening on http://0.0.0.0:3000",
no srvx error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 23:32:23 +00:00
parent f85d51b9f9
commit a2a6b858f7
2 changed files with 15 additions and 6 deletions
+4 -2
View File
@@ -22,8 +22,10 @@ is only the build environment; `punktfunk-host` is launched directly, not via `d
rebuild always matches the running OS. Encode is **VAAPI** on the Deck's AMD GPU (NVENC on NVIDIA),
auto-selected by `PUNKTFUNK_ENCODER=auto`.
The web console is the one part that stays in the container at runtime: it's a Nitro/Node server run
by `bun`, so its service does `distrobox enter pf2 -- … bun run .output/server/index.mjs`.
The web console is the one part that stays in the container at runtime: it's a Nitro **node-server**
build (`bun` builds it; **`node` runs it** — bun mis-resolves Nitro's externalized server deps like
`srvx` at request time), so its service does `distrobox enter pf2 -- … node .output/server/index.mjs`.
Both `bun` and `nodejs` are provisioned in the container.
## Scripts