Installing Node.js on Windows 8

Command line showing node installation
Command line showing node installation

Over the last month I’ve slowly begun exploring Node.js and so far I’m really liking what I’m seeing.

In a nutshell, Node.js (or simply Node) allows you to write server-side JavaScript. In other words, until now JavaScript is normally written to be run within a web browser, on a web page. Node instead allows you to write JavaScript applications that run outside the browser or via the command line.

Node uses Google Chrome’s JavaScript engine, called V8. Perfect if you are used to writing JavaScript for your browser.

This means that you can now write applications, or ‘modules’ that can do stuff outside the scope of a web browser. For example, you could write a simple web server in Node or — and this is what I want to use it for — you could write modules to manipulate web code and automate certain processes related to web development.

Installing Node.js

Installation on Windows 8 could not have been any more straight forward:

  1. Visit
  2. Click the “install” button to download the installer.
  3. Run the installer (make sure you tell the installer to add references to your PATH system variables).
  4. Reboot your PC.
  5. Er…
  6. That’s it!

Command line

Almost everything you do with Node is via a command line. You can use either the standard Windows cmd.exe or Windows PowerShell (or, indeed, any other command line interpreter (CLI) you may have installed).

To use the standard Windows command line:

  1. Press Win + R (for Run)
  2. Type: CMD
  3. Click OK

Checking that Node is installed is as simple as opening a command line and typing:

node --version

Hit enter and you’ll get a result, something like:


Node Package Manager

One of the great things about the Node installer is that it automatically installs the Node Package Manager. This makes it much easier to install additional applications to extend Node’s capabilities.

Again, you can check the version of NPM by typing the following into your CLI:

npm version

You’ll get an answer, returned as a JSON object:

{ http_parser: '1.0',
  node: '0.10.5',
  v8: '',
  ares: '1.9.0-DEV',
  uv: '0.10.5',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1e',
  npm: '1.2.18' }

To find out what packages are installed enter the following into your CLI:

npm ls

The result will be formatted as a directory structure, like this:

├── cssmin@0.4.1
└── n@1.1.0

Obviously, to find out which globally-installed packages are available use the global flag:

npm ls -g

The first application/module that I want to investigate in depth is the CSS pre-processor Less which is used by the Bootstrap project. I will no doubt report back.

Published by

Gareth Saunders

I’m Gareth J M Saunders, 52 years old, 6′ 4″, father of 3 boys (including twins). Enneagram type FOUR and introvert (INFP), I am a non-stipendiary priest in the Scottish Episcopal Church, I sing with the NYCGB alumni choir, play guitar, play mahjong, write, draw and laugh… Scrum master at Safeguard Global; latterly at Sky and Vision/Cegedim. Former web architect and agile project manager at the University of St Andrews and previously warden at Agnes Blackadder Hall.

17 thoughts on “Installing Node.js on Windows 8”

  1. Its very clean and perfect explanation. A kid can also understand the way way you documented without missing anything and this helped me as a beginner.

  2. Pingback: Pro tip: If you are trying to do this tutorial on Windows, when you get to… | Michael K Pate
  3. Hi Gareth,

    Thanks for posting this very useful tutorial. I was at a lost before I found this I tried to follow the official node website but failed to make node.js run. Good job!

    Best Regards,


  4. — i am getting error —
    throw er; // Unhandled ‘error’ event
    Error: spawn ENOENT
    at errnoException (child_process.js:975:11)
    at Process.ChildProcess._handle.onexit (child_process.js:766:34)

    ——— my code look like this ———

    var curl = require(‘curlrequest’);
    var express = require(‘express’);
    var app = express();

    var options = {
    url: “”,
    encoding: null,
    //, headers: { ‘foo bar’: ‘wha’ }

    curl.request(options, function (err, data, meta) {

    data = JSON.parse(data.toString());



  5. After installing the nodejs i was using the command node –version and after enter the cmd shows “node.js is not recognized in internal or external command “

  6. First, thanks for the post, very clear.
    Comment I have a problem to install global packet (-g) with NPM and do not charge me node_modules, but remains in an endless process.
    My path when downloading nodejs is C: Program Files nodejs.
    I would appreciate knowing if there are similar cases and what is the solution.
    From already thank you.

  7. Gareth, thanks for the great article.

    As you are the only one I have found writing about node.js and the windows CLI, I though you may have a hint about what’s going on in the CLI:

    Microsoft Windows [Version 10.0.10240]

    C:UsersChris>node –version

    C:UsersChris>node -e ‘console.log(“Hi, planet!”)’
    // node -e “console.log(‘Hi, planet!’)”
    Hi, planet!


    Why must the double-prime quotation mark be the “outside” wrapper on the in-line script?


  8. Oops! that didn’t work. Lets try that CLI again:


    Microsoft Windows [Version 10.0.10240]

    C:UsersChris>node –version

    C:UsersChris>node -e ‘console.log(“Hi, planet!”)’

    C:UsersChris>node -e “console.log(‘Hi, planet!’)”
    Hi, planet!

    Note: no output from the first invocation.

  9. hey!!
    installed nodejs on my windows 8.1 successfully but there is no installed packages or globally installed packages available.
    coz the result is empty when i run the command npm ls and npm ls -g
    what should i do??
    as i want to install bower and serve through npm!!
    Thanks in advance 🙂

  10. Thanks sir . It’s great article for install node js in own system. I am beginner of node js . I did not know that how to install node js. But I followed your article steps than i installed node js in own system. Thanks once again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.