How can install a new version of NPM ( 1.1.24 )?

I want to install the latest stable version of node - Version 0.6.19 (stable).

http://blog.nodejs.org/ indicates to upgrade to NPM to 1.1.24

Is there a simple way to upgrade to this? I can't figure out how exactly to download and target this version.

The below gives me npm -v 1.0.106

npm upgrade npm

or

npm upgrade npm 1.1.24

Update 2 (03/11/15)

Courtesy: whyleee

On Windows npm is installed together with node in "Program Files". Use npm install npm -g to install it in "%AppData%\npm" and delete 'npm', 'npm.cmd' files from "C:\Program Files\nodejs" dir (because your PATH is looking there first). After that you can use npm update npm -g in the future


According to the docs

For windows (it also worked on Mac for me)

To update npm, run the npm update npm -g command.

Also verify this

Hope this helps

The only thing that worked for me was (from npm readme)

Fancy Windows Install

You can download a zip file from https://npmjs.org/dist/, and unpack it in the same folder where node.exe lives.

In my case folder is :

C:\Program Files (x86)\nodejs

Edit: It seams that newer versions of npm does not exist on address I wrote. I will copy paste instructions from npm git page

You can download a zip file from https://npmjs.org/dist/, and unpack it in the same folder where node.exe lives.

The latest version in a zip file is 1.4.12. To upgrade to npm 2, follow the Windows upgrade instructions in the npm Troubleshooting Guide:

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

If that's not fancy enough for you, then you can fetch the code with git, and mess with it directly.

In ubuntu you can upgrade it using

sudo npm update npm -g

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

Option 3: navigate to C:\Program Files (x86)\nodejs with cmd.exe and then run the installation without -g:

This sovled it for me.