How to Update npm

Node Package Manager (npm) always seems to have an update available. Fortunately, it’s quick and easy to update.

Display the current npm version, update npm, and check the version again:

npm --version
npm install -g npm
npm --version

Here’s the link to the official npm docs for the update.

You can also download the latest node.js if needed here. It’s recommended to use the LTS version, which has been tested with npm.