
NB that v14.4.0 is the latest version of Node but doesn't currently have LTS - long term support provided for it. Run the command below to tell Ubuntu that we want to install the Nodejs To list the different node versions you have installed with nvm, run nvm ls. If you ever need to switch node versions, you can simply run nvm use, for example nvm use v12.18.1.

This command automatically installs nodejs as well as the latest npm version which is at v6.14.5. You can use a similar command to install any version of node you want, for example nvm install 12.18.1. Restart your terminal for your changes to take effect. If you get a version number back like 0.35.3, then you know nvm was successfully installed. To check that nvm is installed, type nvm -version. Sometimes, you may be collaborating on a project with someone using a different version of node and you need to switch node versions to what the project requires. I like nvm because it allows me use different node versions for different projects. I'll show you how to use both.Īll commands here will be run using the Ubuntu CLI/terminal. To get the latest versions, we can use either nodesource or nvm (node version manager). In this tutorial, what we want to do is get either v12.18.1 (LTS - with Long term support) or v14.4 of Node.

As a result, to get the latest versions of any software, we may have to use private packages published by developers. This is because when new versions of a software are released, it can take months for the Ubuntu team to test and release in the official Ubuntu store.

This is the latest version in the ubuntu app store, but it's not the latest released version of NodeJS. If you try installing the latest version of node using the apt-package manager, you'll end up with v10.19.0.
