Skip to main content

Installation

NodeJS is super easy to install. Just head over the Nodejs downloads page.

You will find all the official packages for all major platforms on the Node website(Windows, macOS, and Linux). You should not have any problem but if you run into one. A simple Google search about the problem will fix it up.

Verifying installation

After successfully installing Nodejs, you need to confirm the installation. You can do so by running the command.

node -v

The code above gives the version of the Nodejs installed. if you don't get any version then it means the installation was not successful or it has not been installed.

Node Package Manager(NPM) is usually installed with Node and you can also check the version number of NPM the same way. It is a package manager for publishing Javascript packages(also known as Node modules) to the npm registry.

npm -v

Updating Node

This part is quite tricky. If you have node before now, you can always update or downgrade your node version. To install the latest version, you can follow these steps:

  1. Go to the Nodejs website and use the installer to pick the version you want.
  2. If that does not work for you, use nvm
  3. Check out using the n package on Freecodecamp