Skip to content

fix: gracefully handle missing SQLite FTS5 on Windows#65

Merged
harlan-zw merged 2 commits intomainfrom
fix/fts5-windows-graceful
Apr 8, 2026
Merged

fix: gracefully handle missing SQLite FTS5 on Windows#65
harlan-zw merged 2 commits intomainfrom
fix/fts5-windows-graceful

Conversation

@harlan-zw
Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Closes #64

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Node.js's built-in SQLite on Windows doesn't include the FTS5 module, causing skilld add to crash with "no such module: fts5" during search indexing. This adds an in-memory FTS5 probe in getDb() that runs once and caches the result. When FTS5 is unavailable, it throws SearchDepsUnavailableError so existing handlers skip indexing gracefully with a helpful message instead of crashing.

Probes FTS5 availability with an in-memory test table before attempting
index operations. When FTS5 is missing (common on Windows Node.js
binaries), throws SearchDepsUnavailableError so existing handlers
skip indexing gracefully instead of crashing.

Closes #64
@harlan-zw harlan-zw merged commit 637ea13 into main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: SQLite FTS5 module not available on Windows (Node.js built-in SQLite)

1 participant