mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
The standalone app/ directory created by Next.js only contains runtime files for better-sqlite3 (no binding.gyp, no source, no prebuild-install), so `npm rebuild` inside app/ is a no-op. The previous fix (#312) added exit(1) on rebuild failure, which caused npm to rollback the entire package installation — leaving users with nothing to fix manually. New approach: 1. Check if existing binary is already compatible (dlopen) 2. Copy the correctly-built binary from root node_modules/ (npm already compiles it for the correct platform during install) 3. Fall back to npm rebuild if root binary is unavailable 4. Warn but don't fail the install if nothing works — the package stays installed and the CLI pre-flight check gives a clear error at startup