DEV Community

loading...

How To Upgrade NVM, NPM, Node, and NPX

thecodezs profile image Kenny ・1 min read

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!

Discussion (1)

pic
Editor guide
Collapse
mayronceccon profile image
Mayron Ceccon

👏🏻 NVM is practical!