
nvmrc files using the notation lts/* for the most recent LTS releases.

You can also reference LTS versions in aliases as well as. Note that node refers to an alias of the latest Node.js version. Next, you can simply download and update to the latest Node.js version by running the following: nvm install node If everything went well, it’d output nvm. To confirm if the installation was successful, you can run the following command: command -v nvm This way, you can make changes to your bash profile, allowing you to access nvm system-wide. With these commands, you can clone the repository to ~/.nvm. So, you’ll need to check the latest version before installing it on your machine. The above commands assume that you’re installing nvm version 0.35.3. To install it on macOS or Linux, you can use either Wget or cURL.įor Wget, run the following command on the terminal: wget -qO- https: ///nvm-sh/nvm/v0.35.3/install.sh | bashįor cURL, run the following: curl -o- https: ///nvm-sh/nvm/v0.35.3/install.sh | bash Nvm is a script-based version manager for Node.js. On macOS or Linux, you can use either of the following Node version managers: You can also use it to update your version of Node.js. Updating using a Node version manager on macOS or LinuxĪ Node version manager is a utility that lets you install different Node.js versions and switch flawlessly between them on your machine. Let’s now talk about the different ways on how to update Node.js.ġ. Now install the latest stable version of node.There is an easier way to upgrade Node.js Versions Checking your version of Node.jsīefore getting started, you can check the version of Node.js currently deployed on your system by running the following command on the terminal: node –version Now check if the nvm is installed by typing: The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

To install or update nvm, use the install script using cURL: The full version of Raspberry Pi Raspbian comes with node.js pre-installed but if you chose to install the light version than you will need to follow these steps to install node.js. A number of our examples use node.js so you may need to install node before you can run our JavaScript examples. Node Version Manager (NVM) is a tool that allows you to install versions for node.js.
