Troubleshooting Claude Code Installation on Windows: From TTY Errors to Success

🔧 Troubleshooting Claude Code Installation on Windows: From TTY Errors to Success

By Thanh Phong Le
July 28, 2025

🎯 The Problem

Installing Claude Code on Windows 11 resulted in a frustrating "Raw mode is not supported" error when running through Git Bash, preventing the AI coding assistant from functioning properly.

🔍 Root Causes Discovered

1. Terminal Compatibility Issue

Git Bash doesn't support TTY (terminal) features required by Claude Code's interactive CLI.

# Error in Git Bash
Error: Raw mode is not supported on the current process.stdin

2. Node.js Not in Windows PATH

Node.js was installed but not accessible from PowerShell.

# Diagnostic command
node --version
# Result: 'node' is not recognized

# Verification command
Test-Path "C:\Program Files\nodejs\node.exe"
# Result: True (Node.js exists but not in PATH)

3. NPM Global Package Location

NPM installed Claude Code to user directory, not system directory.

# Find where npm installs global packages
npm config get prefix
# Result: C:\Users\LENOVO\AppData\Roaming\npm

💡 The Solution

Step 1: Switch to PowerShell

Abandoned Git Bash in favor of Windows PowerShell for proper TTY support.

Step 2: Add Node.js to PATH

# Temporary (current session only)
$env:Path += ";C:\Program Files\nodejs"

# Verify
node --version  # Now returns: v20.18.0

Step 3: Install Claude Code

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

Step 4: Add NPM Global Directory to PATH

# Find Claude Code location
Test-Path "C:\Users\LENOVO\AppData\Roaming\npm\claude.cmd"
# Result: True

# Add to PATH
$env:Path += ";C:\Users\LENOVO\AppData\Roaming\npm"

# Verify success
claude --version  # Returns: 1.0.61 (Claude Code)

🚀 Key Takeaways

  1. Terminal matters: Not all terminals are equal on Windows. PowerShell > Git Bash for Node.js CLIs.
  2. PATH is crucial: Even installed software won't work if not in PATH.
  3. Know your npm: Global packages may install to user directories, not system-wide.
  4. Diagnostic commands are your friend: Use Test-Path, npm config, and --version flags liberally.

✅ Final Result

claude doctor
# Claude CLI Diagnostic
# Currently running: npm-global (1.0.61)
# ✓ No TTY errors
# ✓ Ready for AI-assisted coding

From frustrating errors to a working AI coding assistant in 15 systematic debugging steps. Sometimes the most complex-looking errors have simple solutions - you just need to know where to look.

Skills demonstrated: Windows system administration, PATH configuration, Node.js ecosystem, CLI troubleshooting, systematic debugging, technical documentation


If you enjoyed this article, you can also find it published on LinkedIn and Medium.