Old node version

Using a package manager If NVM didn't work for you, a package manager is now your best route.

The Node Package Manager, or NPM, helps you discover, share, and use code, along with dependencies. Node JS comes with npm pre-installed, but it is updated more often than Node.

Run “npm -v” in the terminal to see what your current version is, now run npm install npm@latest -g to install the latest version of npm, if you are not already using it.

Now run “npm -v” again to make sure that the update went through correctly.

Now for the most dreamed up Node JS update, you will need an npm module called “n”.

Run these lines of code in your terminal to clear the npm cache, install the “n” module, and install the latest stable version of Node JS.

sudo npm cache clean -f

sudo npm install -g n

sudo n stable

For you to install the latest version, whether stable or not, run “sudo n latest”, another way is for you to run “n #.#.#”, to update Node JS for a specific version.

Last updated