Rebuild native deps after installing an OpenClaw plugin
OpenClaw's plugin installer runs npm install --ignore-scripts, so native-module
dependencies (better-sqlite3, sqlite-vec, and similar) land without their compiled
binary. The plugin still installs and registers, but the gateway fails to load it
with Cannot find module 'better-sqlite3' or Could not locate the bindings file.
Steps
- Find the plugin directory: ClawHub installs go to
~/.openclaw/extensions/<id>/; npm installs go to~/.openclaw/npm/projects/<id>/. Confirm with the Source column ofopenclaw plugins list. - Read the plugin's
package.jsonand note its native dependencies (e.g.better-sqlite3,sqlite-vec). - From inside that directory, rebuild them:
npm rebuild better-sqlite3 sqlite-vec— replace the list with the actual native deps found in step 2. - Verify the binary is present and loadable:
node -e "require('better-sqlite3')(':memory:')"prints a row with no error, andnode_modules/better-sqlite3/build/Release/better_sqlite3.nodeexists. - Re-run the rebuild after every
openclaw plugins update <id>, because updates reinstall dependencies with--ignore-scripts.