Skip to content

Install Node.js on Windows ​

The required runtime environment for the three major AI coding tools.

Important

Claude Code and Codex CLI both require Node.js 18+. If Node.js 18 or later is already installed, you can skip this section.

Verification command: node -v

Method 1: Official Installer (Recommended) ​

  1. Visit the Node.js download page: https://nodejs.org/zh-cn/download
  2. Download the LTS Windows Installer (.msi).
  3. Run the installer and keep the default options.
  4. The installer automatically configures the system PATH environment variable.

Node.js Download Page ​

Node.js Windows download page

Method 2: Package Manager ​

Winget ​

For Windows 11 or recent Windows 10 versions:

powershell
winget install OpenJS.NodeJS.LTS

Chocolatey ​

Install Chocolatey first, then run:

powershell
choco install nodejs-lts

Scoop ​

powershell
scoop install nodejs-lts

Verify Installation ​

Open Command Prompt or PowerShell and run:

powershell
node --version
npm --version

If version numbers are displayed, such as v18.x.x or later, the installation is successful.

FAQ ​

“Not recognized as an internal or external command” ​

  1. Reopen the terminal window.
  2. Check whether the PATH environment variable includes the Node.js path.
  3. Restart the computer and try again.

Installation failed ​

  1. Run the installer as administrator.
  2. Temporarily disable antivirus software and retry.
  3. Check whether the system drive has enough free space.

Next Steps ​

✅ Environment ready!

You can now continue installing Claude Code, Codex CLI, Codex Desktop, or OpenCode.