better-sqlite3 ABI mismatch crashes extension on WSL 2 — NODE_MODULE_VERSION 137 vs 127
Summary
The extension fails to activate on WSL 2 (Ubuntu 24 LTS) due to a native module ABI mismatch. The bundled better-sqlite3 binary was compiled against NODE_MODULE_VERSION 137 (Node.js 24.x), but VSCode Server's internal Node.js runtime requires NODE_MODULE_VERSION 127 (Node.js 22.x).
This results in a complete activation failure — all extension commands (Code Graph: Build Graph, etc.) are silently unregistered and show "command not found" when invoked.
Environment
| Field |
Value |
| OS |
Windows 11 (x64 10.0.26200) + WSL 2 Ubuntu 24.04 LTS |
| VSCode Version |
1.112.0 |
| VSCode Commit |
07ff9d6178ede9a1bd12ad3399074d726ebe6e43 |
| VSCode Internal Node.js |
22.22.0 (NODE_MODULE_VERSION 127) |
| Electron |
39.8.0 |
| Extension Version |
0.1.1 |
| Extension install location |
~/.vscode-server/extensions/tirth8205.code-review-graph-0.1.1 |
Error
From Output → Extension Host:
2026-03-25 18:33:15.195 [info] ExtensionService#_doActivateExtension tirth8205.code-review-graph,
startup: false, activationEvent: 'onView:codeReviewGraph.codeGraph'
2026-03-25 18:33:15.201 [error] Activating extension tirth8205.code-review-graph failed due to an error:
2026-03-25 18:33:15.201 [error] Error: Cannot find module 'better-sqlite3'
Require stack:
- /home/main-emad/.vscode-server/extensions/tirth8205.code-review-graph-0.1.1/dist/extension.js
/home/main-emad/.vscode-server/bin/07ff9d6178ede9a1bd12ad3399074d726ebe6e43/out/vs/workbench/api/node/extensionHostProcess.js
After manually running npm install in the extension directory, the error changes to:
The module '.../tirth8205.code-review-graph-0.1.1/node_modules/...' was compiled against
a different Node.js version using NODE_MODULE_VERSION 137.
This version of Node.js requires NODE_MODULE_VERSION 127.
Please try re-compiling or re-installing the module.
Additional Context
- The issue is specific to WSL 2 / Linux remote environments where VSCode Server runs its own Node.js binary separate from the system Node.
- On Windows-native VSCode installs this may not manifest, which could explain why it wasn't caught before publishing.
prebuild-install (used during npm install) is also deprecated and should be replaced with node-gyp or a WASM-based approach.
better-sqlite3ABI mismatch crashes extension on WSL 2 — NODE_MODULE_VERSION 137 vs 127Summary
The extension fails to activate on WSL 2 (Ubuntu 24 LTS) due to a native module ABI mismatch. The bundled
better-sqlite3binary was compiled against NODE_MODULE_VERSION 137 (Node.js 24.x), but VSCode Server's internal Node.js runtime requires NODE_MODULE_VERSION 127 (Node.js 22.x).This results in a complete activation failure — all extension commands (
Code Graph: Build Graph, etc.) are silently unregistered and show "command not found" when invoked.Environment
Error
From Output → Extension Host:
/home/main-emad/.vscode-server/bin/07ff9d6178ede9a1bd12ad3399074d726ebe6e43/out/vs/workbench/api/node/extensionHostProcess.js
After manually running
npm installin the extension directory, the error changes to:Additional Context
prebuild-install(used duringnpm install) is also deprecated and should be replaced withnode-gypor a WASM-based approach.