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.
35 lines
1.3 KiB
JSON
35 lines
1.3 KiB
JSON
{
|
|
"name": "@backspace/desktop",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"license": "AGPL-3.0-only",
|
|
"description": "Backspace",
|
|
"author": {
|
|
"name": "Jannis Braun",
|
|
"email": "backspace@backspace.chat"
|
|
},
|
|
"homepage": "https://github.com/TheZwiss/backspace",
|
|
"main": "dist/main.js",
|
|
"scripts": {
|
|
"build:ts": "tsc",
|
|
"dev": "cp build/icon.icns $(find ../../node_modules -path '*/electron/dist/Electron.app/Contents/Resources/electron.icns' 2>/dev/null | head -1) 2>/dev/null; tsc && electron .",
|
|
"build": "tsc && electron-builder",
|
|
"build:all": "tsc && electron-builder --mac --win --linux --arm64 --x64",
|
|
"clean": "rm -rf dist dist-electron",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"postinstall": "electron-rebuild -f -w uiohook-napi || node -e \"console.warn('[desktop] uiohook-napi native rebuild skipped - needs build tools (make, g++, python3). Only required to RUN the desktop app; the server, web client, and Docker image are unaffected.')\""
|
|
},
|
|
"dependencies": {
|
|
"electron-updater": "^6.3.0",
|
|
"uiohook-napi": "^1.5.5"
|
|
},
|
|
"devDependencies": {
|
|
"@electron/rebuild": "^3.7.1",
|
|
"electron": "^40.0.0",
|
|
"electron-builder": "^25.1.8",
|
|
"typescript": "^5.7.2",
|
|
"vitest": "^4.0.18"
|
|
}
|
|
}
|