From c18a252c683521c642680ed491aadc9f64c783ae Mon Sep 17 00:00:00 2001 From: jiachengzhen Date: Tue, 31 Mar 2026 14:27:59 +0800 Subject: [PATCH] fix(openclaw): dedupe postinstall rebuild block (SyntaxError: startMs already declared) Remove duplicate const startMs/result and keep rebuild only inside the else branch when native bindings are missing. Made-with: Cursor --- apps/memos-local-openclaw/scripts/postinstall.cjs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apps/memos-local-openclaw/scripts/postinstall.cjs b/apps/memos-local-openclaw/scripts/postinstall.cjs index 03628bc80..96e073bce 100644 --- a/apps/memos-local-openclaw/scripts/postinstall.cjs +++ b/apps/memos-local-openclaw/scripts/postinstall.cjs @@ -397,16 +397,6 @@ if (sqliteBindingsExist()) { warn("better-sqlite3 native bindings are missing or not loadable."); log(`Searched in: ${DIM}${sqliteModulePath}/build/${RESET}`); log("Running: npm rebuild better-sqlite3 (may take 30-60s)..."); -} - -const startMs = Date.now(); - -const result = spawnSync(npmCmd, ["rebuild", "better-sqlite3"], { - cwd: pluginDir, - stdio: "pipe", - shell: false, - timeout: 180_000, -}); const startMs = Date.now(); const result = spawnSync(npmCmd, ["rebuild", "better-sqlite3"], {