How to update the npm version bundled with your Node.js installation

Posted on Jun 06, 2022

Learn how to update the npm application that's bundled with your Node.js installation

The npm application is a package manager that’s bundled with the Node.js server.

When you install Node.js, you will get a certain version of npm installed on your computer.

Because Node.js release new versions at a slower pace than npm, the included npm version can be outdated after a while.

When you want to update the npm package, run the command npm install -g npm@latest.

Here’s an example of updating npm from version 6 to version 8:

$ npm -v
$ npm install -g npm@latest
+ npm@8.12.1
$ npm -v

As of this writing, the latest version of npm is version 8, so it was installed.

The latest stable version should be installed when you run the command in the future.

And that’s how you update the npm application included with your Node.js server.

Level up your programming skills

I'm sending out an occasional email with the latest programming tutorials. Drop your email in the box below and I'll send new stuff straight into your inbox!

No spam. Unsubscribe anytime.