Getting started with Claude Code
Troubleshooting WSL installation
Currently, Claude Code does not run directly in Windows, and instead requires WSL. If you encounter issues in WSL:
-
OS/platform detection issues: If you receive an error during installation, WSL may be using Windows
npm. Try:- Run
npm config set os linuxbefore installation - Install with
npm install -g @anthropic-ai/claude-code --force --no-os-check(Do NOT usesudo)
- Run
-
Node not found errors: If you see
exec: node: not foundwhen runningclaude, your WSL environment may be using a Windows installation of Node.js. You can confirm this withwhich npmandwhich node, which should point to Linux paths starting with/usr/rather than/mnt/c/. To fix this, try installing Node via your Linux distribution’s package manager or vianvm.
Read more here: Source link
