fix(desktop): don't let uiohook-napi rebuild abort the whole workspace install

The @backspace/desktop postinstall runs `electron-rebuild -f -w uiohook-napi`,
which compiles a native module from source and needs a C++ toolchain
(make/g++/python3). On a bare host without those — a typical VPS a self-hoster
clones onto — that failure took the ENTIRE `pnpm install` down (exit 255), so the
server never installed either, even though uiohook-napi is desktop-only and
irrelevant to hosting.

Make the rebuild non-fatal: on failure it now prints a clear one-line warning and
continues. Machines with build tools (CI, desktop devs) are byte-identical — the
fallback never fires; only toolless boxes (which aren't building the desktop app
anyway) skip it. Verified on a bare x86 box: full `pnpm install` now exits 0 and
the server builds and boots from source. Docs note the build-tool requirement for
desktop work and point self-hosters at the Docker installer.
This commit is contained in:
Jannis Braun
2026-07-06 01:52:06 +02:00
parent 24accc3647
commit e7f41b5609
3 changed files with 14 additions and 1 deletions
+5
View File
@@ -52,6 +52,11 @@ pnpm dev # API server on :3005, Vite dev server on :5173
You can run the two halves separately with `pnpm dev:server` and `pnpm dev:web`.
Working on the **desktop** app additionally needs a C++ toolchain (`make`, `g++`,
`python3`) to build the native `uiohook-napi` module — on Debian/Ubuntu:
`sudo apt install build-essential python3`. Without it `pnpm install` just warns
and skips that one rebuild; the server and web client are unaffected.
Voice and video are optional and require a LiveKit server; see the README for
configuration. Text, federation, uploads, and everything else run fully without
it.