I need to install node.js of version 4.0.0 I tried this:
npm install -g [email protected]
But I got this message: npm is not recognized as an internal or external command, operable program or batch file
This question is related to
node.js
installation
npm
Just uninstall whatever node version you have in your system. Then go to this site https://nodejs.org/download/release/ and choose your desired version like for me its like v7.0.0/ and click on that go get .msi file of that. Finally you will get installer in your system, so install it. It will solve all your problems.
You can use Nodist for this purpose. Download it from here.
Usage:
nodist List all installed node versions.
nodist list
nodist ls
nodist <version> Use the specified node version globally (downloads the executable, if necessary).
nodist latest Use the latest available node version globally (downloads the executable, if necessary).
nodist add <version> Download the specified node version.
More Nodist commands here
https://nodejs.org/en/download/releases/ [Download the specified version]
For windows, best is: nvm-windows
1)install the .exe
2)restart (otherwise, nvm will not be undefined)
3)run CMD as admin,
4)nvm use 5.6.0
Note: You MUST run as Admin to switch node version every time.
run:
npm install -g [email protected]
- or whatever version you want after the @ symbol (This works as of 2019)
Source: Stackoverflow.com