← All guides

Claude Code won't install or run on Windows? Here's how to fix it

Most Claude Code install and startup failures on Windows trace back to a handful of things: Node/npm version, PATH, WSL, or permissions. Here's how to check each one fast.

TL;DR: On Windows, Claude Code usually fails to install or run because of an old Node/npm, a PATH that doesn't include the global npm bin, or running the wrong environment (native Windows vs WSL). Install a current Node LTS, reinstall the CLI globally, confirm it's on PATH, and prefer WSL for the smoothest experience.

The symptoms

Install fails with npm errors

npm throws EACCES, EEXIST, or a build error partway through the global install.

'command not found' after install

It installs, but the terminal can't find the command — a PATH problem.

Crashes or exits immediately

It starts, then quits with a Node error — usually a version mismatch or wrong environment.

Fix 1 — get Node/npm right

A too-old (or mismatched) Node is the number-one cause. Install a current Node LTS, confirm the version, then reinstall the CLI globally so it builds against the right runtime.

node -v    # should be a current LTS
npm -v
# reinstall the CLI globally after upgrading Node
npm i -g @anthropic-ai/claude-code

Fix 2 — fix PATH ('command not found')

If it installs but the command isn't found, the global npm bin folder isn't on your PATH. Find where npm puts global binaries and make sure that folder is on PATH, then open a fresh terminal.

npm config get prefix   # global install location
# add the resulting \bin (or the folder itself on Windows) to your PATH,
# then open a NEW terminal so the change takes effect

Fix 3 — native Windows vs WSL

A lot of Windows friction disappears inside WSL, where the Unix-style tooling Claude Code expects just works. If native Windows keeps fighting you (permissions, PATH, shell quirks), install and run it inside a WSL Ubuntu instead. Make sure you install Node inside WSL, not reuse the Windows one.

Don't mix environments: a Node installed on Windows and a CLI installed inside WSL won't see each other. Pick one environment and install everything there.

Fix 4 — permissions

EACCES/permission errors during a global install mean npm can't write to its global folder. Rather than running everything as admin, point npm's global prefix at a folder you own, or use a Node version manager that keeps everything under your user profile.

Still stuck?

If you've been through Node, PATH, WSL and permissions and it still won't behave, it may be worth trying a client that doesn't depend on a global npm install and a specific shell setup at all. A self-contained desktop agent installs like a normal app and runs the same loop — you bring a model key and go, without the Node/PATH/WSL scavenger hunt.

FAQ

Why does Claude Code say 'command not found' after installing?

The global npm bin folder isn't on your PATH. Run 'npm config get prefix' to find where global packages install, add that bin folder to PATH, and open a new terminal.

Should I run Claude Code on native Windows or WSL?

WSL is usually smoother — the Unix tooling it expects works out of the box. Just install Node inside WSL and don't mix it with a Windows Node install.

How do I fix EACCES permission errors on install?

npm can't write to its global folder. Set npm's global prefix to a directory you own, or use a Node version manager under your user profile, instead of installing globally as admin.

If the Node/PATH/WSL setup is more work than the coding, Wuwei is a free, open-source AI agent that installs like a normal desktop app — no global npm install, no PATH hunting. Bring any model key and start working.

Windows · macOS · Linux — free, no login