Commit e99e4ad
fix(installer): force native rebuild on every run + post-install smoke test
When `npm install --omit=dev` finds the lockfile already satisfied (the
case on upgrade re-runs) it skips touching node_modules — including
prebuilt native binaries. If the host's Node version has drifted since
the original install, the cached better_sqlite3.node has the wrong ABI
and the service crashloops with ERR_DLOPEN_FAILED on first openDb().
We hit this in the wild upgrading a v0.5.0 box (Node 23 at install time)
to v0.6.0 (Node 20 now). The release tarball doesn't ship node_modules
— the bad binary was preserved from the original install.
Now: unconditionally `npm rebuild better-sqlite3` after the install step
so the ABI matches the actual Node binary the service will use, and
fail fast at install time with `node -e "require('better-sqlite3')"`
instead of letting systemd find out the hard way.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4c31434 commit e99e4ad
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
278 | 296 | | |
279 | 297 | | |
280 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments