Make sure you have a
.bashrc
file in your user profile folder (~/.bashrc
) as thenvm
command will be configured there. If not, create one.Install nvm (Node Version Manager): In Git Bash, run the
curl
command written here. Alternatively, instead of usingcurl
, you can download the install script (install.sh
) also from here, right click the file » “Open with” » “Git for Windows”.Close Git Bash and reopen it.
Type
command -v nvm
which should outputnvm
if the installation was successful.Type
nvm install node
which will install Node.js and npm as well.Type
npm -v
andnode -v
to confirm the installation was successful.
How to install nvm, Node.js, and npm
These are the steps I followed to install nvm, Node.js, and npm on Windows.