fix: rebuild better-sqlite3 for Electron's Node ABI in prod builds
Electron 41 embeds Node 24 (ABI 145) while system Node 22 (ABI 127) produces incompatible native modules. Add electron-rebuild step to the desktop build pipeline so better-sqlite3 is recompiled against Electron's headers before packaging.
This commit is contained in:
Generated
+1
@@ -36350,6 +36350,7 @@
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron/rebuild": "^4.0.3",
|
||||
"@types/node": "24.6.0",
|
||||
"@types/ws": "^8.5.14",
|
||||
"electron": "41.0.3",
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
"description": "Paseo desktop app (Electron wrapper)",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
"build": "npm --prefix ../.. run build:daemon && npm run build:main && electron-builder --config electron-builder.yml",
|
||||
"build": "npm --prefix ../.. run build:daemon && npm run build:main && npm run rebuild-native && electron-builder --config electron-builder.yml",
|
||||
"build:main": "tsc -p tsconfig.json",
|
||||
"dev": "./scripts/dev.sh",
|
||||
"rebuild-native": "electron-rebuild -m ../.. -o better-sqlite3",
|
||||
"test": "vitest run",
|
||||
"typecheck": "tsc --noEmit -p tsconfig.json"
|
||||
},
|
||||
@@ -19,6 +20,7 @@
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron/rebuild": "^4.0.3",
|
||||
"@types/node": "24.6.0",
|
||||
"@types/ws": "^8.5.14",
|
||||
"electron": "41.0.3",
|
||||
|
||||
Reference in New Issue
Block a user