From ce3b2d8ae3929e282c6b995e3aef89a83bfd5f9f Mon Sep 17 00:00:00 2001 From: Jacob Taunton Date: Mon, 23 Feb 2026 22:20:40 -0800 Subject: [PATCH] fix: run npm install after extension copy in setup.sh plugins install copies extension files but doesn't install npm dependencies. After rm -rf of the extension dir, node_modules are lost and the plugin fails to load with "Cannot find module" errors. Co-Authored-By: Claude Opus 4.6 --- setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.sh b/setup.sh index 544e214..a219303 100755 --- a/setup.sh +++ b/setup.sh @@ -171,6 +171,13 @@ cmd_sync() { else log_warn "Extension install had warnings (check logs)" fi + # Install extension dependencies (plugins install copies files but may not run npm install) + if [[ -f "$EXTENSION_DIR/package.json" ]]; then + log_info "Installing extension dependencies..." + cd "$EXTENSION_DIR" + npm install --production 2>&1 | tail -3 + log_ok "Extension dependencies installed" + fi cd "$SCRIPT_DIR" log_info "Updating clawdbot.json..."