mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
`bun add -g omniroute` (and any runtime that does not reliably run the better-sqlite3 postinstall script) leaves the *.node binary undownloaded. The `bindings()` loader then throws "Could not locate the bindings file" BEFORE any DLOPEN happens, which the previous detector missed — the user saw a generic 500 page instead of the friendly "Run npm rebuild better-sqlite3" guide. Extended isNativeSqliteLoadError() to recognise: - "Could not locate the bindings file" (bindings module preflight) - "Cannot find module 'better-sqlite3'" (package not even installed) - code === "MODULE_NOT_FOUND" (Node loader fallback) isNativeSqliteLoadError is now exported so tests can pin the contract; the detector covers both the "wrong NODE_MODULE_VERSION" and "binary never shipped" failure modes operators have hit in practice.
2.4 KiB
2.4 KiB