Follow the link to download and install Node.js: Download Node.js
Update Node.js to the latest stable version: Node.js can be updated from the official Node.js website as well as through the command line using Node Version Manager(nvm). nvm was originally developed for Linux systems, however nvm can be installed separately for Windows system by the following steps:
- Go to this site
- Install and unzip the nvm-setup.zip file
- From cmd type nvm -v to ensure nvm is installed.
After installing nvm, the following can be done to update Node.js to the latest version:
nvm install <version>
Check the list of available Node.js version in the system using the following command:
To use the desired version, use the following command:
nvm use <version>
Update npm: To update NPM, use the following command:
npm install -g npm
Below is a demonstration for updating Node.js and npm versions for Linux systems.
Install nvm in Linux:
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Check if nvm is installed successfully
Open a new terminal nvm -v
To install latest version of node, use the following command.
# nvm install node or # nvm install -lts or # nvm install
Check all the available version of node on the system:
# nvm ls
Use a particular version
# nvm use
Update npm to latest version:
# npm install -g npm
- How to install the previous version of node.js and npm ?
- How to update NPM ?
- Nodejs | Automatic restart NodeJs server with nodemon
- What are the differences between npm and npx ?
- Steps to Create and Publish NPM packages
- How to use External Modules and NPM in a project ?
- Difference between npm and yarn
- How to import SASS through npm ?
- How to import LESS through npm ?
- Introduction to NPM scripts
- What is the meaning of --save for NPM install ?
- Node.js NPM arraybuffer-to-string Module
- Node.js NPM string-to-arraybuffer Module
- Node.js NPM shortid Module
- Node.js NPM uuid
- How to install modules without npm in node.js ?
- Node.js | process.version Property
- Node.js | os.version() Method
- Signup Form Using Nodejs and MongoDB
- Difference between NodeJS and AngularJS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.