fix: rebuild better-sqlite3 on install to fix Node version mismatch

Adds postinstall script to rebuild better-sqlite3 native bindings for
the current Node.js version. Fixes ERR_DLOPEN_FAILED when installing
via npx on a different Node version than was used to publish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
newblacc
2026-03-29 22:29:53 +02:00
co-authored by Claude Opus 4.6
parent 321c828c86
commit fa6b7e8939
3 changed files with 10 additions and 3 deletions
+5
View File
@@ -5,6 +5,11 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
## [1.0.1] - 2026-03-29
### Fixed
- `better-sqlite3` native module now rebuilt on install via `postinstall` script, fixing Node.js version mismatch errors (e.g. Node v22 vs v25) when installing via npx
## [1.0.0] - 2026-03-29
### Changed
+3 -2
View File
@@ -1,12 +1,13 @@
{
"name": "excalidraw-mcp-sentinel",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "excalidraw-mcp-sentinel",
"version": "1.0.0",
"version": "1.0.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@excalidraw/excalidraw": "^0.18.0",
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "excalidraw-mcp-sentinel",
"version": "1.0.0",
"version": "1.0.1",
"description": "Hardened, self-hosted Excalidraw MCP server with SQLite persistence, multi-tenancy, auto-sync, security middleware, and 369 tests",
"main": "dist/index.js",
"type": "module",
@@ -17,6 +17,7 @@
"dev": "concurrently \"npm run dev:server\" \"vite\"",
"dev:server": "npx tsc --watch",
"production": "npm run build && npm run canvas",
"postinstall": "npm rebuild better-sqlite3 --update-binary 2>/dev/null || true",
"prepublishOnly": "npm run build",
"setup": "node dist/index.js setup",
"update": "node dist/index.js update",