To manage multiple Node.js versions on windows, you are going to use and install node-windows. After installation, you run following commands to setup specific node version:
d:\>nvm install 4.7.2
d:\>nvm use 4.7.2
d:\>node --version
and if you get following message
'node' is not recognized as an internal or external command, operable program or batch file.
then read this post to troubleshoot the issue.
Troubleshooting:
1. Make sure before installation, there was no existing Node.js installed on your machine. If installed then uninstall all and install nvm again.
2. During nvm installation, make sure the selected path must NOT exist.
Suppose if you selected "C:\Program Files\nodejs" in installation then nodejs must NOT exist in "Program Files" folder. It will be created by setup. If there is already folder then delete it, run "nvm use" command and test it again.
3. You must run command as administrator.
"Start" > type "cmd" > right-click and "run as administrator"4. Before install node, run "nvm on" command then install and use specific node version
5. If problem still exists, check following
d:\>echo %NVM_SYMLINK%
d:\>echo %NVM_HOME%
It will show the selected path.
In %PATH%, both paths should be there.
In NVM_HOME path folder, you will get the node version folder (i.e. v4.7.2) which has node.exe, npm, node_modules folders...etc. If all files are there then problem to create symlink. Try to create symlink manually :
d:\>mklink /j "%NVM_SYMLINK%" "%NVM_HOME%\v4.7.2"
then you will get the exact error message. it may be permission issue or path already exists. so you can take action accordingly.
Hope it helps. Enjoy Node.js !!