Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

node.js

npm

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
like image 662
captainill Avatar asked Jun 07 '12 07:06

captainill


2 Answers

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

like image 151
Dhiraj Avatar answered Oct 01 '22 12:10

Dhiraj


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.

like image 28
Igor Avatar answered Oct 01 '22 11:10

Igor