native-module-troubleshoot

Diagnose and resolve native module issues in Electron applications.

1|Updated Oct 8, 2025
One-click install
npx skills add https://github.com/fattits30-dev/Justice-Companion --skill native-module-troubleshoot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-module-troubleshoot
Source: https://github.com/fattits30-dev/Justice-Companion/tree/main/.claude/skills/native-module-troubleshoot
Command: npx skills add https://github.com/fattits30-dev/Justice-Companion --skill native-module-troubleshoot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill diagnoses and resolves common native module issues in Electron applications, particularly NODE_MODULE_VERSION mismatches with better-sqlite3. It eliminates frustrating development blockers and saves hours of manual debugging.

Core Features & Use Cases

  • Automated Diagnosis: Identifies NODE_MODULE_VERSION mismatches, "Electron failed to install correctly" messages, and SQLite binding errors.
  • Guided Fixes: Provides precise commands to rebuild native modules for the correct runtime (Node.js for tests, Electron for the app).
  • Environment Validation: Verifies Node.js, Electron, and pnpm versions for compatibility.
  • Use Case: When a developer encounters a "NODE_MODULE_VERSION mismatch" error, Claude automatically diagnoses the root cause (e.g., wrong Node.js version or incorrect rebuild) and provides the exact pnpm rebuild command needed to fix it, getting development back on track immediately.

Quick Start

If running tests and encountering module errors:

pnpm rebuild:node pnpm test

If running the Electron app and encountering module errors:

pnpm rebuild:electron pnpm electron:dev

If Node.js version is incorrect (must be v20.18.0):

nvm use 20 # or fnm use 20 pnpm install