Angular – Installing NodeJS and NPM (Node Package Manager)

Installing NodeJS and NPM are both prerequisites of an Angular app. To install these, go to http://nodejs.org/en/download and click the correct installer for your computer:

Click and run the file after downloading and you will see your computer installing NodeJS and NPM.

installing nodejs

After the installation, you can now verify if Node and NPM are successfully installed by checking their version through your terminal:

installing nodejs

As you can see, the command for checking the version is “node -v” and “npm -v”. Their versions should be seen immediately. Now, you have successfully installed NodeJS and NPM on your computer.

But as we’ve said, Angular is going through changes often and it’s important to keep up with the updates and ensure you are installing NodeJS and NPM’s latest versions. First, you have to take note of your current version to compare them to your updated version. In your terminal, it should look like this:

installing nodejs

As you can see, we checked the version first then typed “sudo-i” to login to “root”. Next is “npm install npm -g” to install the updates for Node. And last is “npm cache clean -f” then “n stable” for NPM. After each update, we compare the versions to the previous ones and there you have it! Your NodeJS and NPM are now updated.

Checking for updates and fixes for Node and NPM are highly recommended because of it’s rapidly changing behavior.

Again, installing NodeJS and NPM are important prerequisites prior to creating an Angular app so always check that you have the latest version!

On the next tutorial article, we will talk about Angular-CLI Installation.

Subscribe Now and Upgrade Your Skills Today!
Sign up now and have the latest tech tutorials delivered straight to your mailbox.

PLUS: Get exclusive member-only discounts (up to 80% OFF!!) on our top tech courses in Udemy!
We hate spam. Your email address will not be sold or shared with anyone else.