Install Troubleshooter
Claude Code won't install? Walk the fix decision tree.
- $25 Free
- 60 sec
- No signup
Pick your OS and the error
Answer the follow-ups
Run the fix command it gives you
You get: The cause of your install failure plus the exact fix command.
Your setup
Commands are tailored to macOS. Everything runs client-side - nothing leaves your browser.
The fix for macOS
Likely cause
The install may not have completed, or the folder where the binary lives is not on your PATH, so the shell cannot find the `claude` command.
Do this in order
- First confirm the install: run `claude --version`. If that errors too, reinstall with `npm install -g @anthropic-ai/claude-code`.
- Open a brand new terminal window so your shell reloads its profile.
- Find the global bin folder: run `npm bin -g`. The `claude` binary should live there.
- Add that folder to PATH in your shell profile (~/.zshrc), then run `source` on it or open a new terminal.
Why Claude Code installs fail
Almost every failed Claude Code install traces back to one of five things: the binary is not on your PATH, npm hit a permission wall installing globally, your Node version is too old, a proxy or firewall blocked the download, or the install stalled on a flaky network. Pick your OS and symptom above and this troubleshooter gives you the ordered fix for that exact combination. The commands are tailored per operating system because the right fix on macOS is not the right fix on Windows.
Work the steps in order and stop when it works - you rarely need all of them. The first step for most symptoms is a cheap check (run `claude --version`, run `node --version`) that tells you whether the problem is even what you think it is.
The five install failure modes
- PATH - the binary installed but the shell cannot find it. The most common 'command not found' cause. Fix: add the global bin folder to PATH and open a new terminal.
- npm permissions (EACCES) - npm cannot write to its global folder. Fix: set a user-owned prefix. Never sudo, never chmod 777.
- Node version - your runtime is older than Claude Code supports. Fix: upgrade Node to current LTS and reinstall.
- Proxy / network - a corporate proxy, VPN, or firewall blocks the download. Fix: set proxy env vars and whitelist the endpoints.
- Stalled install - partial download or corrupted cache. Fix: clear the npm cache and retry with --verbose to see the real blocker.
Open a new terminal before you panic
A huge share of 'it didn't work' reports on any OS are solved by opening a fresh terminal. PATH changes and new global installs are only picked up by new shell sessions. On Windows you may need to fully close and reopen the terminal, or sign out and back in.
The safe way to fix npm permission errors
- Never run `sudo npm install -g`. It plants root-owned files in your npm folder that cause the same EACCES error next time - it moves the problem, it does not solve it.
- Instead, give npm a global folder your user owns: `mkdir -p ~/.npm-global` then `npm config set prefix ~/.npm-global`.
- Add that folder's bin to your PATH in your shell profile.
- Open a new terminal and reinstall without sudo.
- If a previous sudo install already left root-owned files, the Permission Error Fixer tool on this site walks through reclaiming ownership safely.
Verifying a clean install
Once the install completes, confirm it end to end before you start working. Run `claude --version` to prove the binary is on your PATH. Run `which claude` on macOS/Linux or `where claude` on Windows to see exactly which binary the shell will use - useful if you have multiple Node versions and suspect the wrong one is winning. Then start Claude Code and complete the auth flow. If all three work, the install is genuinely done, not just half-done.
When to reinstall vs when not to
Reinstalling is the right fix for exactly one situation: the binary is actually missing or corrupt (`claude --version` itself errors). For PATH problems, permission problems, Node-version problems, and network problems, a reinstall changes nothing - the new install lands in the same wrong place, hits the same permission wall, or fails on the same old Node. Diagnose the symptom first. Reinstalling as a reflex is how a five-minute PATH fix turns into a lost afternoon.
Getting unstuck for good
Once your environment is set up correctly - a user-owned npm prefix, a current Node, the bin folder on PATH - install and upgrade problems mostly disappear. The one-time investment of fixing the environment properly (rather than sudo-ing past each error) pays back every time you install or update a global tool, not just Claude Code. The Claude Code Club setup module walks through a clean, resilient environment from scratch so you never fight the installer again.
Frequently asked questions
I installed it but 'claude: command not found'. Why?
The binary installed, but the folder it lives in is not on your PATH, or you are in the same terminal session as before the install. Open a new terminal first. If it still fails, run `npm bin -g` to find the folder and add it to your PATH.
Should I use sudo to fix an npm permission error?
No. `sudo npm install -g` creates root-owned files that trigger the same EACCES error later. The correct fix is a user-owned global prefix: `npm config set prefix ~/.npm-global` and add its bin to PATH. See the Permission Error Fixer tool.
How do I know if my Node version is too old?
Run `node --version`. If install or startup throws an engine/unsupported-version error, upgrade to the current Node LTS (via nvm on macOS/Linux, the official installer or nvm-windows on Windows), then reinstall Claude Code.
The install hangs behind my company network. What do I do?
A corporate proxy or firewall is blocking the download. Set HTTP_PROXY and HTTPS_PROXY (and `npm config set proxy`) to route through it, and ask IT to whitelist the npm registry and the Anthropic API endpoint. Temporarily disabling a VPN confirms whether it is the blocker.
Do I need to reinstall every time something breaks?
No. Reinstall only when the binary is actually missing or `claude --version` itself errors. PATH, permission, Node-version, and network problems are not fixed by reinstalling - the new install hits the same wall.
How do I confirm the install actually worked?
Run `claude --version` (proves it is on PATH), then `which claude` / `where claude` (shows which binary wins), then start Claude Code and complete auth. If all three succeed, you are genuinely set up.
Liked this tool? The club is the next step.
Join Claude Code Club for $9/month. 650+ lessons, weekly updates, and the workflows behind every tool on this site.
- No experience needed
- Cancel anytime
- Updated weekly
