[BUG] Documentation fix for Claude CLI error in WSL + Windows Detection

Resolved 💬 3 comments Opened May 24, 2025 by ElanHasson Closed Nov 29, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: n/a
  • Operating System: WSL + Windows
  • Terminal: Windows Terminal App

Bug Description

If you run WSL and have npm/node installed on both WSL and Windowxs, by default WSL imports your windows path to WSL environment. In my case, Windows took priority and npm was actually running in Windows, but outputting in the linux environment. :)

I use nvm, and i recently switched to use a different node version and it broke because it started running on Windows. after I switched to a new node version. Apparently I installed node / nvm on windows since my last version install in wsl.

The solution is to either disable path importing or remove npm/node/nvm etc from Windows.

Steps to Reproduce

  1. Install nvm in WSL + use some version (i.e. lts)
  2. Do the same in Windows
  3. Use another version in WSL

Expected Behavior

Update the docs and the error output from claude-code cli.

Actual Behavior

It's not a bug in claude-code cli, but it's a common environmental issue.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗