How to update to the latest npm version
To update your npm to the latest version, do …
npm install -g npm@latest
This is an instance where you use npm to update itself. The -g flag is to install it “globally” which is commonly the case for command line programs.
For reference see doc from the npm site.