◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/Claude Code
⟐ Claude Code/2026-03-29Beginner

Claude Code Won't Start: Complete Diagnostic Checklist

Systematic guide for diagnosing Claude Code startup failures. Covers Node.js, npm, PATH, permissions, and proxy issues with step-by-step troubleshooting.

Claude Code264setup6troubleshooting92installationchecklist

Claude Code startup failures typically fall into four categories. This guide provides a systematic checklist to identify and resolve the root cause.

Four Common Failure Patterns

  1. Missing environment setup: Node.js or npm not installed
  2. PATH or permission issues: Executable inaccessible or path not configured
  3. Network or proxy problems: No internet connection or proxy blocking
  4. Node.js version mismatch: Using an unsupported old version

Step 1: Verify Node.js and npm Installation

# Check if Node.js is installed
node --version
# Expected output: v18.16.0 or higher
 
# Check npm version
npm --version
# Expected output: 9.0.0 or higher

If Node.js isn't installed:

macOS (using Homebrew):

brew install node

Ubuntu/Debian:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

Windows: Download the LTS version from nodejs.org.

Update Node.js if Needed

Claude Code requires Node.js 16.x or newer:

# Update Node.js (Homebrew)
brew upgrade node
 
# Update npm
npm install -g npm@latest

Step 2: Verify PATH Configuration

If Node.js is installed but you get "command not found", PATH isn't configured correctly.

# Check node path
which node
# Expected: /usr/local/bin/node
 
# Check npm path
which npm
# Expected: /usr/local/bin/npm

If either command isn't found:

Add the following to your shell configuration file (.bash_profile, .zshrc, .bashrc):

# Add to ~/.bash_profile or ~/.zshrc
export PATH="/usr/local/bin:$PATH"
 
# Apply the configuration
source ~/.bash_profile  # for bash
# or
source ~/.zshrc         # for zsh

Open a new terminal window for changes to take effect.

Step 3: Install or Verify Claude Code

Claude Code is managed as an npm package.

# Check if Claude Code is installed globally
npm list -g claude-code
# or
claude-code --version

If not installed:

# Install Claude Code globally
npm install -g claude-code
 
# Verify installation
claude-code --version

If you get permission errors:

# Method 1: Using sudo (simple but not recommended)
sudo npm install -g claude-code
 
# Method 2: Fix npm permissions (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$PATH:$HOME/.npm-global/bin"
 
# Add the PATH export to ~/.bash_profile or ~/.zshrc

Step 4: Verify Executable Permissions (macOS/Linux)

# Check executable permissions
ls -la $(which claude-code)
# Expected: -rwxr-xr-x (first "rwx" shows execute permission)
 
# If execute permission is missing, add it
chmod +x $(which claude-code)

Step 5: Configure Proxy (Corporate Networks)

In corporate proxy environments, npm cannot download packages.

# Check current proxy settings
npm config get proxy
npm config get https-proxy
 
# Set proxy (example: proxy.company.com:8080)
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
 
# For authenticated proxies
npm config set proxy http://username:password@proxy.company.com:8080
npm config set https-proxy http://username:password@proxy.company.com:8080

To clear proxy settings:

npm config delete proxy
npm config delete https-proxy

Step 6: Clear npm Cache

Corrupted cache can cause installation failures.

# Verify cache integrity
npm cache verify
 
# Force clear cache
npm cache clean --force
 
# Reinstall Claude Code
npm install -g claude-code

Step 7: Check Firewall Settings

Security software or firewalls may block npm downloads.

Windows Defender:

  • Settings → Security → Virus & threat protection → Manage settings
  • Add npm folder (C:\Users\[Username]\AppData\Roaming\npm) to exclusions

macOS:

  • System Settings → Security & Privacy
  • Check that npm isn't being blocked by the firewall

Common Error Messages and Solutions

"command not found: claude-code"

Solution:

  1. Run Step 2 (PATH verification)
  2. Rerun npm install from Step 3
  3. Open a new terminal window

"EACCES: permission denied"

Solution: Run Step 4 (fix permissions) or Step 3 (npm permission setup).

"npm ERR! code ENOTFOUND" (Network Error)

Solution:

  1. Check internet: ping 8.8.8.8
  2. If behind proxy, configure in Step 5
  3. Verify npm registry: npm config get registry (default: https://registry.npmjs.org/)

"node version is too old"

Solution: Run Step 1 to update Node.js to 18.x or newer.

Startup Verification Checklist

Confirm all of these before attempting to run Claude Code:

  • [ ] node --version shows 16.x or newer
  • [ ] npm --version shows 9.x or newer
  • [ ] which claude-code returns a path
  • [ ] claude-code --version displays the version
  • [ ] (macOS/Linux) Executable permissions exist (ls -la shows rwx)
  • [ ] Network connection is active (ping 8.8.8.8 succeeds)
  • [ ] (Corporate networks) npm proxy is configured

Complete Startup Test

# Open a new terminal window
# Run these commands in order
 
# 1. Verify environment
echo "=== Node and npm Versions ==="
node --version
npm --version
 
# 2. Verify Claude Code
echo "=== Claude Code Verification ==="
claude-code --version
 
# 3. Test startup
echo "=== Startup Test ==="
claude-code --help
 
# If help text appears, setup is successful

Looking back

Most Claude Code startup issues can be resolved using this checklist. Work through the steps in order to identify and fix the problem. For more detailed configuration examples, see the Complete Claude Code Setup Guide.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⟐ Claude Code2026-04-01
Using Claude Code on Windows — Native vs WSL2
Set up Claude Code on Windows using the native installer or WSL2. Includes step-by-step instructions, a practical comparison, and troubleshooting tips.
⟐ Claude Code2026-10-12
After Moving to SPM, My App Died the Moment It Launched — Reading One dyld Line with Claude Code
Right after moving from CocoaPods to Swift Package Manager, the build passed but the app died on launch. Here is how I traced one dyld line to its cause, the fix, and how to verify it.
⟐ Claude Code2026-10-05
I Wrote "I'll Do the Commits" in CLAUDE.md. The Next Morning git log Had One More Line.
When Claude Code commits despite being told not to: undo with git reset --soft, then stop it physically with permissions.deny plus a PreToolUse hook. Covers the git -c form that deny rules let through, and how to test the hook without starting Claude Code.