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.
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
To upgrade NPM to the latest version use following command:
npm install -g npm@latest
Once you have nvm installed you can use the following command to get the latest stable version of Node.js
nvm install stable
Since NPX is also node package we can use NPM to install or update it:
npm install -g npx
Thank you for Reading!