The term '-S.exe' is not recognized as a name of a cmdlet,

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 5 comments · opened Feb 25, 2025 · closed Mar 6, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

!Image

I tried installing it today and it doesn't work yet, maybe there is something wrong with my setup.

View original on GitHub ↗

5 Comments

bcherny collaborator · 1 year ago

Hey! Can you paste the full command, or run /bug next time you see this?

rba100 · 1 year ago

@bcherny I have the same error:

npm install -g @anthropic-ai/claude-code
claude
&: C:\Users\Robin\AppData\Roaming\npm\claude.ps1:24
Line |
  24 |      & "-S$exe" node --no-warnings=ExperimentalWarning --enable-source …
     |        ~~~~~~~~
     | The term '-S.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check
     | the spelling of the name, or if a path was included, verify that the path is correct and try again.

This happens either in PS or the legacy cmd terminal. npm 9.3.1, node 23.8.0, PS 7.4.6

wolffiex collaborator · 1 year ago

I think you are using Powershell and not WSL?

igorkofman collaborator · 1 year ago

Claude Code only works with WSL so closing.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.