nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation : The term 'bash' is not recognized as the name

velara3 opened this issue · comments

On this page:
https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating

It says:

To install or update nvm on Windows, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

That results in this message:

bash : The term 'bash' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:76

The troubleshooting section doesn't mention this error message above.

Can you update the guide to address this error?

What OS/shell are you using (that’s listed as supported in the readme) that doesn’t have bash?

It's the terminal that's running in VSCode (powershell) Windows 11

image

nvm does not support powershell. On windows, nvm only supports git bash, cygwin, or WSL2.

I don't have nvm installed. I am trying to install it.

right - but you can't install it on powershell because nvm doesn't support it.

So what do I install it on? CMD?

no, on windows, you'd have to use git bash, cygwin, or WSL2, as per the readme and my above comment. nvm doesn't support cmd.exe or powershell.