claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

NVM Node Version Switch Breaks Claude Code Installation on Windows

Open phillipphoenix opened this issue 1 year ago • 8 comments

When switching between node versions on Windows with NVM for Windows, I lose access to Claude Code. It seems to be installed for the specific version. Therefore I wanted to migrate the installer, but that fails without any helpful error messages, even with the debug flag enabled.

I also couldn't find any help online for this issue.

This is not with WSL, but native Windows.

phillipphoenix avatar Jul 17 '25 20:07 phillipphoenix

Yeah, it doesn't play nice with nvm at all. claude doctor reports some things as unknown and things such as the initial dialog "Do you trust..." don't get saved.

AleksiAleksiev avatar Jul 20 '25 11:07 AleksiAleksiev

The native installer for Windows has some issues at the moment, we'll have an update here soon.

ant-kurt avatar Jul 21 '25 19:07 ant-kurt

Same issue on macOS with nvm as well.

designnotdrum avatar Jul 22 '25 23:07 designnotdrum

@phillipphoenix the native installer should be working better with Windows as of v1.0.58 - want to give that a try?

ant-kurt avatar Jul 23 '25 17:07 ant-kurt

@phillipphoenix the native installer should be working better with Windows as of v1.0.58 - want to give that a try?

I just tried it, and the installation ran successfully through all the steps. But the alias doesn't seem to work properly. It said it was successful, but I get an error when trying to run the command. Also after restarting the terminal.

So two steps forward and one step back? 😅

EDIT:

After some more research, it seems the problem is that it first of all states that alias setup is complete (but it shows how to manually set it up). Then it also shows how to set it up in .bashrc, which does not work with powershell. This is the output of that step:

Alias setup complete
To configure claude, add this line to your C:\Users\pphoe\.bashrc:
  alias claude="C:\Users\pphoe\.claude\local\claude"
Then run: source C:\Users\pphoe\.bashrc

Since the script is a bash script it can't be run directly with powershell, but I got around it by adding this to my powershell profile file:

# Claude Code alias
function claude { & "C:\Program Files\Git\bin\bash.exe" "C:\Users\pphoe\.claude\local\claude" $args }

It runs it with Git Bash. But it would be nice to be able to run it directly and have the alias added automatically during migration, if possible.

phillipphoenix avatar Jul 26 '25 09:07 phillipphoenix

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 04 '25 10:12 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 04 '26 10:01 github-actions[bot]

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.

github-actions[bot] avatar Jan 13 '26 14:01 github-actions[bot]