ClawKit Logo
ClawKitReliability Toolkit

Fix Windows: openclaw plugins install spawn EINVAL

Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:432:19)

On Windows, openclaw plugins install <plugin-name> can fail with Error: spawn EINVAL. This is a Node.js child-process error meaning Windows rejected the spawn call โ€” most often because of a missing executable, bad PATH, or PowerShell policy restrictions.

Next Step

Fix now, then reduce repeat incidents

If this issue keeps coming back, validate your setup in Doctor first, then harden your config.

Step 1: Run as Administrator

The most common cause is insufficient permissions. Right-click PowerShell or Command Prompt and select Run as administrator, then retry:

Install plugin as Administrator
# In an Administrator PowerShell or cmd:
openclaw plugins install <plugin-name>

# Example:
openclaw plugins install browser-use-api

Step 2: Fix PowerShell Execution Policy

If the plugin installer runs a .ps1 script, Windows may block it. Set the execution policy for the current user:

Set execution policy (Administrator PowerShell)
# Run in Administrator PowerShell:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

# Then retry:
openclaw plugins install <plugin-name>

Avoid Bypass or Unrestricted for the execution policy scope โ€” these disable Windows Script Host protection entirely. RemoteSigned allows local scripts and signed remote scripts only.

Step 3: Install Git for Windows

Some plugin installers spawn git as a sub-process. If Git is not on PATH, the spawn call returns EINVAL:

Install Git via winget
winget install Git.Git

# After install, close and reopen your terminal
git --version

During the Git installer, make sure "Add Git to PATH" is checked (it is by default in the recommended installation).

Step 4: Reinstall Node.js LTS

A corrupted or outdated Node.js install can cause spawn to fail even with correct PATH. Download Node.js LTS from nodejs.org and reinstall, then retry:

Check Node.js version
node --version   # Should be v22 or later
npm --version

# After reinstalling Node.js:
npm install -g openclaw
openclaw plugins install <plugin-name>

Verify Plugin Installed

List installed plugins
openclaw plugins list

The installed plugin should appear in the list. If it does, restart the Gateway to activate it: openclaw gateway restart.

Did this guide solve your problem?