David Trejo's Thoughts

« Back to blog

How to Install Node.JS on Windows

Nodejs_logo

Update 11/23/11: Download the official node.exe binary or .msi at http://nodejs.org/#download; install npm using these steps http://npmjs.org/doc/README.html#Installing-on-Windows-Experimental (note that there are plans to include npm in the .msi installer).

UpdateHere are the official instructions: github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)

 

I wanted to install node on my windows machine and I stumbled across this thread.

All you need to do is download the file below and then unzip it.

http://dl.dropbox.com/u/341900/nodejs/nodejs-0.1.99-cygwin-full.zip 

Then run bash.bat and do something of this sort:

 cd ~/Desktop

 nodejs-0.1.99-cygwin-full/node/bin/node.exe example.js

A big thanks to Simon Sturmer for posting the link!

mirror: http://dl.dropbox.com/u/10047/nodejs-0.1.99-cygwin-full.zip

 

Update 11/23: Cygwin is no longer supported. See the top of the page.

The less easy way (will work even if node 0.1.99 gets old)

Go to http://nodejs.org/#download and download the zip file.

Download cygwin at http://www.cygwin.com/ (it is a dependency of node). The download link is at the top right. This could take a while.

Open cygwin via start > Cygwin > Cygwin Bash Shell

Navigate to the location of the zip file, using "ls" and "cd" commands. Mine is on my desktop.

When the zip file is in the current directory, run 

tar zxvf node<tab>

(Press tab after you type node to trigger auto-complete so there are no typos)

Congrats! Now you have an unzipped version of node on your desktop. Now to set up a version of python 2.4 or greater.

Download the latest version of python at http://www.python.org/download/ (it is a dependency of node)

When that finishes, go back to the Cygwin window you had open earlier. cd into the node directory you just unzipped.

Run

./configure
make
make install

You're done! Super congrats since you did it the hard way!

If you feel like running the tests, run 

make test

Hopefully I made the process less painful; please let me know if this could be improved in the comments.

Enjoy!

Posted July 1, 2010