Command To Update NPM To The Latest Version


NPM Update

To update NPM to the new major version available, you only need one command:

$ npm install -g npm

If you are running on MacOS or Linux:

$ sudo npm install -g npm

You can visit the npm page for more information:

https://github.com/npm/cli/releases/tag/vX.X.X

I got this message today:

   ╭───────────────────────────────────────────────────────────────╮
   │                                                               │
   │      New major version of npm available! 6.14.10 → 7.5.2      │
   │   Changelog: https://github.com/npm/cli/releases/tag/v7.5.2   │
   │               Run npm install -g npm to update!               │
   │                                                               │
   ╰───────────────────────────────────────────────────────────────╯