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