xxxxxxxxxx
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