How do I update node and npm on windows? Install or upgrade Node.js on Windows

Run PowerShell as Administrator

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

Install Node.js

  1. Open http://nodejs.org in a browser and click Install. Download the .msi package.
  2. After the download has completed, double-click the .msi package. As of this writing, the MSI is node-v0.10.25-x64.msi.
  3. Click Run.
  4. Click Next.
  5. Check I accept the terms in the License Agreement. Click Next.
  6. Click Next.
  7. Click Next.
  8. Click Install.
  9. Enter your Administrator password, if prompted.
  10. Click Finish.

Verify the node installation

Open PowerShell, then run the following commands:

node --version

# Expected output: v0.10.25

npm --version

# Expected output: 1.3.24

Upgrade packages (upgrade only)

If you are upgrading from a previous version of node, then you will want to update all existing global packages.

npm cache clean

npm update -g
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s