Created
May 6, 2018 07:36
-
-
Save harishkotra/3a245890ad7e793499dd84f5fb80b20d to your computer and use it in GitHub Desktop.
Steps to update npm on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**This is the new best way to upgrade npm on Windows.** | |
**Run PowerShell as Administrator** | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force | |
npm install -g npm-windows-upgrade | |
npm-windows-upgrade | |
Note: Do not run `npm i -g npm`. Instead use npm-windows-upgrade to update npm going forward. Also if you run the NodeJS installer, it will replace the node version. | |
- Upgrades npm in-place, where node installed it. Easy updating, update | |
to the latest by running npm-windows-upgrade -p -v latest. | |
- Does not modify the default path. | |
- Does not change the default global package location. | |
- Allows easy upgrades and downgrades. | |
- Officially recommended by the NPM team. A list of versions matched between NPM and NODE (https://nodejs.org/en/download/releases/) - but you will need to download NODE INSTALLER and run that to update node | |
(https://nodejs.org/en/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment