-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Windows: openclaw update fails with spawn EINVAL + broken feishu onboarding import #47748
Description
Bug 1: openclaw update fails with spawn EINVAL on Windows
Environment
- OS: Windows 11 Pro 10.0.26200
- Node.js: v22.17.1
- pnpm: 10.30.2
- OpenClaw: 2026.2.27 → updating to 2026.3.14 (961f42e)
Steps to reproduce
openclaw update
Error output
◇ ✓ Preparing preflight worktree (3.93s)
◇ ✓ preflight checkout (961f42e0) (255ms)
◇ ✓ Cleaning preflight worktree (2.11s)
◓ preflight deps install (961f42e0)..Error: spawn EINVAL
■ Canceled
Root cause
In src/process/exec.ts, shouldSpawnWithShell() always returns false for security reasons. However, on Windows, .cmd files (like pnpm.cmd) require shell: true or must be invoked via cmd.exe /c to avoid EINVAL. The resolveCommand() function correctly appends .cmd, but spawning a .cmd file without a shell is not supported by Node.js on Windows.
Suggested fix
Consider enabling shell: true specifically when the resolved command ends with .cmd on Windows, or use cmd.exe /c as the spawn target:
export function shouldSpawnWithShell(params: {
resolvedCommand: string;
platform: NodeJS.Platform;
}): boolean {
if (params.platform === "win32" && params.resolvedCommand.endsWith(".cmd")) {
return true;
}
return false;
}Bug 2: Build fails due to broken import in feishu extension
Error
[UNRESOLVED_IMPORT] Error: Could not resolve './onboarding.js' in extensions/feishu/src/channel.runtime.ts
Root cause
Commit 66a8c257b (Feishu: lazy-load runtime-heavy channel paths) created channel.runtime.ts which re-exports feishuOnboardingAdapter from ./onboarding.js. However, onboarding.ts was already removed in the earlier commit 40be12db9 (refactor: move feishu zalo zalouser to setup wizard).
No other file in the codebase references feishuOnboardingAdapter, so the export is dead code.
Fix
Remove the broken import from extensions/feishu/src/channel.runtime.ts:
export { listFeishuDirectoryGroupsLive, listFeishuDirectoryPeersLive } from "./directory.js";
-export { feishuOnboardingAdapter } from "./onboarding.js";
export { feishuOutbound } from "./outbound.js";Workaround
Manual update works:
cd /path/to/OpenClaw
git pull origin main
# Remove the broken import line in extensions/feishu/src/channel.runtime.ts
pnpm install
pnpm build