DEV Community

Kehinde Abe
Kehinde Abe

Posted on

How To Upgrade NVM, NPM, Node, and NPX

I was working on a project and almost all of my Node packages were outdated, I searched for commands and options on keeping versions of core components consistent. I couldn't get all in one article so I wrote this about NVM, NPM, Node.js, and NPX.

NVM.
I think the most recent version of NVM is v0.35.3 and to install or update NVM use this command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

NPM.
To upgrade NPM to the latest version use following command:

npm install -g npm@latest

Node.
Once you have nvm installed you can use the following command to get the latest stable version of Node.js

nvm install stable

NPX.
Since NPX is also node package we can use NPM to install or update it:

npm install -g npx

Thank you for Reading!

Top comments (2)

Collapse
 
jwalzak profile image
Jason Walzak

This is the fifth page I've tried using to update my nodejs install on my rpi.

This is the one that worked. Thank you very much!

Collapse
 
mayronceccon profile image
Mayron Ceccon

๐Ÿ‘๐Ÿป NVM is practical!