My Software Notes

Useful things I discover

Archive for February 2012

Installing npm (Node Package Manager) on Windows

with 4 comments

A while ago I tried and tried and tried and tore out my hair trying to install npm on Windows (in case you’re new to node-js, npm is the Node Package Manager – sort of a NuGet for Node).

I followed the instructions but I got all sorts of annoying errors that I just could not get around no matter what I tried.  So I gave up.

A couple of days ago I saw that there was a nice looking book called “Node for Front-End Developers” that looked like it didn’t need any packages installed, so I bought it and decided to get the latest version of Node.  I went to the Node website and there on the home page was a download button that popped up a choice of Node versions for Windows, Mac or any other platform (by getting the source and building it yourself).

I ran the Windows installer and (hoo-friggin-ray!) it installed npm at the same time.

The new installer is nice and simple – it just runs and installs Node.  What more can you ask for in an installer?  (Well, maybe giving the choice of where to install Node would be good, in case you don’t want to put it in “c:\program files”.)

One gotcha about running npm in Windows 7 – if you are installing something globally, you must run npm as an administrator because it is under “c:\program files” and any changes you want to make in that area require admin privileges.

Anyway, I got started on the book, which is very hands-on, and I’m learning more and more about Node.

I’ll blog more about it as I discover the wonders of JavaScript on the server.

Written by gsdwriter

February 7, 2012 at 2:33 pm

Posted in JavaScript, node.js

Tagged with ,