#368·VidBee

[Bug]: prepare:native-deps overwrites better-sqlite3 causing API crash

Author: virtuechoCreated May 3, 2026Updated Sep 25, 2026
Labelsbug

Observed behavior and screenshots

Observed behavior

After running pnpm dev (desktop), the API server (pnpm run start:web) fails with:

Error: The module '...better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 139. This version of Node.js requires NODE_MODULE_VERSION 137.

Steps to reproduce

  1. pnpm dev (desktop starts, rebuilds better-sqlite3 for Electron)
  2. Stop the desktop app
  3. pnpm run start:web (or pnpm --filter ./apps/api run dev)
  4. API crashes with the above error

Context

  • The desktop script rebuilds better-sqlite3 for Electron 38 (NODE_MODULE_VERSION 139), overwriting the shared copy hoisted by pnpm.
  • The API needs the Node.js version (139 vs 137).

Logs or screenshots

No response

App version

1.3.10

OS version

Windows 11, Node.js v24.15.0, pnpm v10.33.2