Installing nodeJs in Windows (The easiest way)

The immensely exciting nodejs is not really made to run on Windows, but like me, if you want to develop on a Windows system then you will need to install it on Windows.

Installing nodeJs on Windows

  1. Get the Windows binary from http://node-js.prcn.co.cc/. Download the complete package. The current version is 0.4.4. You can download it from http://node-js.prcn.co.cc/bin/0.4.4/node-0.4.4-i686-pc-cygwin-complete.7z.
  2. Create a directory (preferably with no spaces in its full path) and extract the contents of above 7z file into that. (You will need free 7zip to extract it.) Let this directory be C:\node.
  3. Create folder etc in the above folder, i.e. inside C:\node. So etc folder will be in the same folder as bin, lib etc folders.
  4. Inside the above etc folder create a file resolv.conf.
  5. Inside the above file paste the following:-
    nameserver 8.8.8.8
    nameserver 8.8.4.4

Using npm

npm is the popular package manager for nodejs now. So, to be able to use this is absolutely necessary.

  1. Launch cmd (Windows Command).
  2. Type cd C:\node\bin (if node is folder where you extracted the node binaries).
  3. Type shell.
  4. Now run your npm as – node npm install <package name> (without the angle brackets of course).

 

Comments
8 Responses to “Installing nodeJs in Windows (The easiest way)”
  1. Dave says:

    The npm instructions don’t work on Windows 7 with the node.js 4.7 binaries. The file “npm” seems to have the system attribute set. Removing the attribute (attrib -s *), then running “node npm” fails with:

    /usr/bin/npm:1
    !��.
    ^

    node.js:134
    throw e; // process.nextTick error, or ‘error’ event on first tick
    ^
    SyntaxError: Unexpected token <
    at Module._compile (module.js:399:25)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at Array. (module.js:423:10)
    at EventEmitter._tickCallback (node.js:126:26)

  2. Dave says:

    Having run shell.cmd, and within the “C:\node\bin” directory mentioned in the instructions, obviously.

  3. Apple Grew says:

    Sorry I can’t help you with this. I suggested asking this in npm group (http://groups.google.com/group/npm-).

  4. Vance says:

    Thanks for this post, as I’m trying to learn Node.js on my Windows laptop.

  5. TerryB says:

    Worked like a charm for me. Windoze Vista. Make sure to run shell.exe from the cmd prompt, not bash.

  6. jneira says:

    Hi, thanks for the post, it works form me when i execute node in its bin directory but it doesnt find the modules if i do it in another one (i have the path to node/bin in my PATH env var)

  7. sachin says:

    thanks dear, it worked for me. i just put all the extracted data of my zip in a folder c:/node/ and just run the command ->”node npm install node” . Beyond it i do nothing more than it.

Leave A Comment