Node.js and Node Package Manager (NPM) are rapidly evolving technologies and they are updated quite frequently, with new updates almost every month. Usually, NPM is more frequently updated that Node.js is. To keep up with this change, you have to ensure that you have the latest version of Node.js and NPM in your computer.

#1. First, take note of your current Node.js and NPM version:

> node -v
> npm -v

#2. Go to your terminal and login as root

> sudo -i

#3. Run these commands below to clear the cache and update Node.js & NPM:

> npm cache clean -f
> npm install -g n
> n stable
> npm install npm@latest -g

#4. Lastly, check your latest Node.js & NPM versions to verify the update:

> node -v
> npm -v

JOIN THE ANGULAR ACADEMY!
$100,000 is the average annual salary of talented software developers and your chances of getting this salary get better by learning Angular 2 today!

Sign up now and make the first step towards upgrading your skill set.

PLUS: Get up to 75% OFF our Angular 2 course in Udemy!
We hate spam. Your email address will not be sold or shared with anyone else.