Installing NodeJs and NPM can be done like any other windows application using the installer downloaded from Node.js website.
- Download the Windows installer package from Node.js website (nodejs.org).
- Run the downloaded msi package.
- Accept the license agreement and click NEXT a few times until you get below screen.
- Observe that Setup window shows following packages –
- Node.js runtime (actual node executable)
- npm package manager (that node package manager we discussed previously)
- Online documentation shortcuts (few links to help)
- Add to PATH (This makes node and npm commands to be executable from any path in command prompt.)
- Optional – Restart your Windows OS. This will help you to be safe in case Add to PATH step does not reflect.
Verify your node.js installation
Using following commands, one can assure installation is successful
- Node – Open command prompt and type node –v. This should print node version.
- NPM – Open command prompt and type npm –v. This should print npm version.
Upgrade and uninstall existing node.js application:
No need to do for new installations.
To upgrade just download latest package installer and follow installation procedure as above. To uninstall,
- Open Control Panel and choose ‘Programs and Features’.
- Click ‘Uninstall a program’ option.
- Double click Node.js in the list of programs shown and follow steps shown on screen.
Optional – Restart Windows.