Auto-detect and rebuild native modules on Node.js version changes
Bug Fixes
- Native Module Compatibility: Auto-detects Node.js version changes and rebuilds better-sqlite3 when needed
- Self-healing Recovery: Gracefully handles ERR_DLOPEN_FAILED errors with automatic reinstall on next session
- Version Tracking: Enhanced .install-version marker now tracks both package and Node.js versions (JSON format)
- Runtime Verification: Added verifyNativeModules() to catch ABI mismatches and corrupted builds
Technical Details
This release fixes a critical issue where upgrading Node.js (e.g., v22 → v25) would cause native module failures that the plugin couldn't auto-recover from. The smart-install script now:
- Tracks Node.js version in addition to package version
- Verifies native modules actually load (not just file existence)
- Triggers rebuild when either version changes
- Handles runtime failures gracefully with helpful user messaging
Contributors
- @dreamiurg - Thank you for the comprehensive fix and thorough testing!
Merged PRs
- #149 - feat: Auto-detect and rebuild native modules on Node.js version changes