How to Update NPM on Windows 10

NPM Tutorials and Tips Windows 10

The NPM team officially recommends this method of updating Node. (source below)

Let’s begin.

First, open PowerShell as administrator and run the following command.

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade

You will be prompted to select a version of NPM to install. Use arrow keys to move up and down and choose the version you want to update to and press Enter.

If your upgrade is successful, you should see something like this.

Source

Matthew Horne

Matthew is a web developer from the United Kingdom who taught himself PHP and JavaScript and never looked back. If you would like to hire me, shoot me an email.

  • Simon 5th April 2019, 11:06 am Link Reply

    Nice one, thanks Matthew!

  • BEREKETABE 1st January 2020, 2:42 pm Link Reply

    HI mattew. ican’t necesserly proceed from the first syntax “Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force” how can i fix it?

    • Matthew Horne 21st January 2020, 10:00 am Link Reply

      Try to run the script with administrator rights.

      Right click on the downloaded python installer and click run as administrator.

Leave a Comment