Upgrading npm on windows

Had a windows machine which needed to upgrade npm to avoid the whole ^ incompatibility issue. ex:

npm ERR! Error: No compatible version found: minimist@’^0.1.0′
npm ERR! Valid install targets:
npm ERR! [“0.0.0″,”0.0.1″,”0.0.2″,”0.0.3″,”0.0.4″,”0.0.5″,”0.0.6″,”0.0.7”,”0.0.8
“,”0.0.9″,”0.0.10″,”0.1.0″,”0.2.0″,”1.0.0″,”1.1.0”]

Well, I was doing it in the command prompt I was using which was launched as admin for other stuff (since no sudo on windows). So recognizing that the installed version of npm didn’t understand the ^ sign because I listen to nodeup, I typed “npm install -g npm” but got

(a bunch of this type of thing…)
npm WARN unmet dependency which is version 1.0.0
npm WARN unmet dependency C:\Users\jdart\AppData\Roaming\npm\node_modules\npm\no
de_modules\read-installed\node_modules\readdir-scoped-modules requires once@’^1.
3.0′ but will load
npm WARN unmet dependency C:\Users\jdart\AppData\Roaming\npm\node_modules\npm\no
de_modules\once,
npm WARN unmet dependency which is version 1.3.0
npm ERR! peerinvalid The package npmconf does not satisfy its siblings’ peerDepe
ndencies requirements!
npm ERR! peerinvalid Peer npm-registry-client@3.2.2 wants npmconf@^2.1.0

And finally

npm ERR! System Windows_NT 6.2.9200
npm ERR! command “C:\\Program Files\\nodejs\\\\node.exe” “C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js” “install” “npm” “-g”
npm ERR! cwd C:\Windows\System32
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\System32\npm-debug.log
npm ERR! not ok code 0

When I tried to “more c:\windows\system32\npm-debug.log”, I found out it didnt’ exist which made me realize my current directory was c:\windows\system32 which ideally should be super protected, so I changed my directory to something not-system-level and ran again successfully. No further testing, YMMV

Advertisements

About joeldart

I am a 29 year old software developer living in Indianapolis, IN.
This entry was posted in Uncategorized. Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s