Skip to content

ruv-swarm MCP crashes on Node 24: better-sqlite3 missing prebuilt binaries #185

Description

@sparkling

Description

ruv-swarm@1.0.20 MCP server crashes immediately on Node 24 (v24.13.0) with:

Could not locate the bindings file. Tried:
 → .../better-sqlite3/lib/binding/node-v137-linux-x64/better_sqlite3.node

Root Cause

package.json declares "better-sqlite3": "^11.6.0". When installed via npx, npm resolves to better-sqlite3@11.10.0, which does not ship prebuilt binaries for Node 24 (ABI node-v137). The native addon compilation fails silently — build/Release/ contains obj/ dirs but no .node binary.

better-sqlite3@^12.0.0 adds Node 24 support with prebuilt binaries.

Fix

Bump the dependency in package.json:

-    "better-sqlite3": "^11.6.0",
+    "better-sqlite3": "^12.0.0",

Affected Files

  • src/sqlite-pool.jsimport Database from 'better-sqlite3'
  • src/persistence.jsimport Database from 'better-sqlite3'
  • src/sqlite-worker.jsimport Database from 'better-sqlite3'
  • src/mcp-tools-enhanced.js — uses SwarmPersistencePooled (indirect)

Environment

  • Node: v24.13.0
  • npm: 11.8.0
  • OS: Linux x64
  • better-sqlite3 resolved: 11.10.0 (no prebuilts for node-v137)

Workaround

# Clear npx cache and reinstall with better-sqlite3@^12
RS_DIR=$(find ~/.npm/_npx -path "*/node_modules/ruv-swarm" -type d | head -1)
cd "$RS_DIR" && npm install better-sqlite3@"^12.0.0" --no-save

Note

@claude-flow/cli is unaffected because it uses sql.js (pure WASM SQLite) which has no native bindings.

Affected Versions

ruv-swarm 1.0.20

Related Issues

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions