Complete Tutorial for Installing Claude Code on Windows: Starting from Node.js

Published 2026-06-06 02:00 509 words 3 min read ... Page views

A step-by-step guide for installing Claude Code on the Windows system, from installing Node.js to configuring the API.
Listen to this article
0:00 / --:--

I previously wrote about how to configure Claude Code to use the MiMo and DeepSeek APIs, but I didn’t cover the installation process. This article provides a step-by-step guide for installing Claude Code on Windows from scratch, suitable for those who have no experience with Node.js.


Step 1: Install Node.js

Claude Code is a Node.js application, so the first step is to install Node.js.

  1. Download the installation package: node-v24.16.0-x64.msi
  2. Double-click to start the installation process and click “Next” at each step, using the default settings.
  3. After the installation is complete, restart your terminal (PowerShell or CMD).

To verify the installation:

node -v
# If the output is something like v22.x.x, the installation was successful.
npm -v
# If the output is something like 10.x.x, the installation was successful.

Node.js versions 18 and later are compatible with Claude Code. It is recommended to install the latest LTS (Long-Term Support) version.


Step 2: Install Claude Code

Open PowerShell and run the following command:

npm install -g @anthropic-ai/claude-code

The -g flag indicates a global installation, so you can use the claude command from any directory after the installation.

To verify the installation:

claude --version

If a version number is displayed, the installation was successful.


Step 3: Configure the API

Claude Code uses the official Anthropic API by default. If you have your own Anthropic Key, you can skip this step and go directly to Step 4.

If you want to use a third-party API (which may be more cost-effective), you can refer to the two articles I wrote earlier:


Step 4: Launch Claude Code

Open a terminal in your project directory and enter the following command:

claude

The first time you launch Claude Code, you will be prompted to log in to your Anthropic account or configure an API Key. Once you have completed the configuration, you can start using it immediately.

Claude Code will automatically detect the code in the current directory, and you can use natural language to ask it to help you write code, fix bugs, or add new features.


Common Issues

Q: “npm install” fails with a “permission denied” error Run PowerShell with administrative privileges, or use npx to execute the command temporarily:

npx @anthropic-ai/claude-code

Q: The “claude” command is not found Try restarting the terminal. If the issue persists, check if Node.js is installed correctly (run node -v).

Q: Connection to the API times out Verify that ANTHROPIC_BASE_URL is set correctly and that your network can access the API address.


That’s all for installing Claude Code on Windows. After the installation, you can refer to my previous articles Configuring Claude Code for the MiMo API and Using the DeepSeek API to learn how to integrate third-party APIs.

... Page views
© 2026 violet @qiyuan