upgrade npm from command line code example
Example 1: upgrade npm
npm i -g npm-upgrade
Example 2: update npm
npm install -g npm@latest
// for global install
npm i -g npm-upgrade
npm install -g npm@latest
// for global install