← Back to Troubleshoot

Node.js Version Too Old

Error: Node.js 22+ required. Found: v18.x.x / SyntaxError: Unexpected token

OpenClaw troubleshooting · Updated 2026

Error Message

Error: Node.js 22+ required. Found: v18.x.x / SyntaxError: Unexpected token

What Causes This

OpenClaw requires Node.js 22 or higher. Older versions cause cryptic syntax errors or explicit version check failures during installation or startup.

How to Fix It

Upgrade Node.js to version 22:

# Check current version
node --version

# Upgrade via nvm (recommended)
nvm install 22
nvm use 22
nvm alias default 22

# Or via Homebrew (macOS)
brew install node@22

# Or via NodeSource (Linux/WSL)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs

# Verify and reinstall OpenClaw
node --version  # Should show v22.x
npm install -g openclaw@latest

See Also