Having problems upgrading to npm v 2.+

Pure Krome's Avatar

Pure Krome

01 Apr, 2015 09:04 AM

G'day!

i'm doing this in my install script ...

npm -g install npm@2
C:\Users\appveyor\AppData\Roaming\npm\npm -> C:\Users\appveyor\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm@2.7.4 C:\Users\appveyor\AppData\Roaming\npm\node_modules\npm
npm --version
1.4.28

when i swear it was returning v 2.7.something .. earlier today.

Is there any trick for me to use the latest version of NPM in my script section?

  1. Support Staff 1 Posted by Feodor Fitsner on 01 Apr, 2015 04:36 PM

    Feodor Fitsner's Avatar

    It should be:

    npm -g install npm@2
    set PATH=%APPDATA%\npm;%PATH%
    npm --version
    
  2. 2 Posted by Pure Krome on 02 Apr, 2015 01:05 AM

    Pure Krome's Avatar

    Ah drats! i had that set PATH.. code in, this morning .. but deleted that line when I was cleaning up the script.

    Added it back - all good.

    I guess this is the best way to make sure we're using the latest version of NPM?

  3. Support Staff 3 Posted by Feodor Fitsner on 02 Apr, 2015 01:06 AM

    Feodor Fitsner's Avatar

    I think so.

  4. 4 Posted by Pure Krome on 02 Apr, 2015 03:51 AM

    Pure Krome's Avatar

    Rgr, Ta!

  5. Pure Krome closed this discussion on 02 Apr, 2015 03:51 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Jul, 2026 06:29 AM
09 Jul, 2026 04:35 PM
07 Jul, 2026 07:22 PM
30 Jun, 2026 08:51 PM
26 Jun, 2026 03:33 PM

 

25 Jun, 2026 12:31 AM
05 Jun, 2026 07:28 PM
29 May, 2026 02:17 PM
28 May, 2026 06:46 PM
21 May, 2026 04:32 AM
12 May, 2026 05:50 PM