LearnInstall Node.js® and NPM on Windows: A How-To Guide

Dave McFarland
writes on January 7, 2015

If you’re looking to take your JavaScript coding to another level, Treehouse offers unlimited courses in JavaScript (and many other subjects) starting at $25/month. Try our program out with a free seven-day trial today.

JavaScript is quickly becoming the go-to language for web developers. Front-end web developers use JavaScript to add user interface enhancements, add interactivity, and talk to back-end web services using AJAX. Web developers who work on the server-side are also flocking to JavaScript because of the efficiencies and speed offered by JavaScript’s event-driven, non-blocking nature.

In fact, concentrating on JavaScript as your language of choice offers the opportunity to master a single language while still being able to develop “full-stack” web applications. The key to this server-side JavaScript revolution is Node.js® — a version of Chrome’s V8 JavaScript runtime engine — which makes it possible to run JavaScript on the server-side.

Node.js is also used for developing desktop applications and for deploying tools that make developing web sites simpler. For example, by installing Node.js® on your desktop machine, you can quickly convert CoffeeScript to JavaScript, SASS to CSS, and shrink the size of your HTML, JavaScript and graphic files. Using NPM — a tool that makes installing and managing Node modules — it’s quite easy to add many useful tools to your web development toolkit.

In a previous article, I wrote about how to install Node.js® and, it’s companion, NPM on a Mac. Fortunately, for Windows users, the Node.js® installation process is a lot easier than how I recommend installing Node.js® on a Mac.


Node isn’t a program that you simply launch like Word or Photoshop: you won’t find it pinned to the taskbar or in your list of Apps. To use Node you must type command-line instructions, so you need to be comfortable with (or at least know how to start) a command-line tool like the Windows Command Prompt, PowerShell, Cygwin, or the Git shell (which is installed along with Github for Windows).

Installation Overview

Installing Node and NPM is pretty straightforward using the installer package available from the Node.js® web site.

Installation Steps

  1. Download the Windows installer from the Nodes.js® web site.
  2. Run the installer (the .msi file you downloaded in the previous step.)
  3. Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
  4. Restart your computer. You won’t be able to run Node.js® until you restart your computer.

Test it!

Make sure you have Node and NPM installed by running simple commands to see what version of each is installed and to run a simple test program:

  • Test Node. To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v. This should print a version number, so you’ll see something like this v0.10.35.
  • Test NPM. To see if NPM is installed, type npm -v in Terminal. This should print NPM’s version number so you’ll see something like this 1.4.28
  • Create a test file and run it. A simple way to test that node.js works is to create a JavaScript file: name it hello.js, and just add the code console.log('Node is installed!');. To run the code simply open your command line program, navigate to the folder where you save the file and type node hello.js. This will start Node and run the code in the hello.js file. You should see the output Node is installed!.

Check and Update Your Node and NPM Versions

New versions of Node and NPM come out frequently. To install the updates, just download the installer from the Nodejs.org site and run it again. The new version of Node and NPM will replace the older versions.

How to Uninstall Node and NPM

You uninstall Node.js and NPM the same as you would most Windows software:

  1. Open the Windows Control Panel
  2. Choose the “Programs and Features” option
  3. Click the “Uninstall a program” option
  4. Select Node.js, and click the Uninstall link.

With Node.js and NPM installed you’ll soon be able to take advantage of the huge world of NPM modules that can help with a wide variety of tasks both on the web server and on your desktop (or laptop) machine. The NPM site lists all of the official Node packages making it easy to make the choice. Have fun!

Learn with Treehouse

Learning with Treehouse starts at only $25 per month. If you think you’re ready to start exploring if tech is right for you, sign up for your free seven day trial.

What sets Treehouse apart is their dedication to helping you find your perfect job or develop your own business. – SwitchUp.org

Follow us on Twitter, Instagram, and Facebook for our favorite tips, and to share how your learning is going. We’ll see you there!

If you liked reading this article, you should also look at these two:

118 Responses to “Install Node.js® and NPM on Windows: A How-To Guide”

  1. anuja19 on March 15, 2018 at 1:25 pm said:

    Very helpful for me to start with ReactJs. Thanks a ton Dave.

  2. Thanks a ton for this Dave.. Big help. I’m torn being a web dev student because I love BOTH windows AND mac… and before this I had to basically ignore my practically brand new windows laptop that has a bigger screen and keyboard than my wife’s mac. Now I can use my favorite machine again at home when Im working on projects, and she can get back to having her laptop back at night time when she is trying to unwind from work!


  3. Thanks for the Session.Its Useful for me!!!

  4. Tsokoloy Manka on December 16, 2017 at 3:01 am said:

    When i type :
    node -v
    Its say:
    ‘CALL “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js” prefix -g’ is not recognized as an internal or external command,operable program or batch file. 5.5.1

    how can i fix it? Thank you in advance 😉

  5. Typing: node -v
    This is the output:
    ‘CALL “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nodejs\\node_modules
    \npm\bin\npm-cli.js” prefix -g’ is not recognized as an internal or external com
    operable program or batch file.

    is this a problem? how can i fix it?

  6. Supun Tharinda on December 13, 2017 at 2:54 am said:

    Very helpful. Thank you!

  7. Please help me to resolve this

    npm install
    npm WARN saveError ENOENT: no such file or directory, open ‘C:\Users\PIBM-202\pckage.json’
    npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\PIBM-202\packge.json’
    npm WARN PIBM-202 No description
    npm WARN PIBM-202 No repository field.
    npm WARN PIBM-202 No README data
    npm WARN PIBM-202 No license field.

    removed 1 package in 7.928s

  8. Dave Burton on October 18, 2017 at 11:01 pm said:

    This is wrong: “4. Restart your computer. You won’t be able to run Node.js® until you restart your computer.”

    There’s no need to restart your computer. You need only close & reopen your command prompt window (to update $PATH).

  9. Hi, using sublime text. When I paste the code: console,log(‘Node is installed!’); in the editor and try to save it in C: where node folder lives, I meet an error which states that I am not permitted to install a file in that folder and yet I am in in the admin account..

    • You just made my day, lol. I’m a newbie at all this, but I can still sometimes help troubleshoot. My interest is that I’m seeing at least a couple people who appear to be having your same problem.

      By coincidence, I played in Windows this past week. It actually has *too much* admin rights for my comfort. Yet there you are as #3 now not being able to do something while those permissions are in place.

      You said your node folder is under C:\. Have you been able to do other things without extra effort before now and in that folder path specifically?

      Or did you have to take the extra step of going through an “Administrative Tools” chain of command to accomplish things in that directory?

      No, I don’t know anything beyond to ask that right now. My thought is that maybe that detail will help others help you diagnose.

      It’s interesting that you’re experiencing this right NOW and so are those one or two others elsewhere yet still others are moving right on along without a problem. The two or so I’m remembering were having problems deleting under that directory path, but theirs may only have been an issue of timing a work-around deletion fix while npm was performing some actions.

  10. Awesome article…very helpful!!

  11. Sudha Vajha on September 6, 2017 at 11:13 pm said:

    When i m installing the express ,cookie-parser,multer I m getting warning

    npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\admin\package.json’
    npm WARN admin No description
    npm WARN admin No repository field.
    npm WARN admin No README data
    npm WARN admin No license field.

  12. Sudha Vajha on September 6, 2017 at 10:41 pm said:

    C:\Users\admin>node D:\Error\errorlist.js
    throw err;

    Error: Cannot find module ‘method-override’
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (D:\Error\errorlist.js:5:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

  13. im trying to update node js because I need it to install appcelerator studio, but when I update it to version 6.+ using install file from nodejs.org node -v still outputs 0.10.17.

    Been talking to appcelerator support for ever a week but they seem to go around in a circle and have no idea what the problem is.
    Any ideas as to why nodejs isn’t updating properly?

  14. Why Is it I am getting this error?

    (function (exports, require, module, __filename, __dirname) { console.log(‘Node is installed!’);

    SyntaxError: Invalid or unexpected token
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)

  15. Mariya Baby on August 8, 2017 at 11:34 pm said:

    Thanks for sharing! Excellent article!

  16. Cristina on August 7, 2017 at 3:00 am said:

    Me sale error al hacer la última comprobación y ya reinicié y creé el documento reuqerido en la ubicación especificada:

    Your environment has been set up for using Node.js 6.11.2 (x64) and npm.

    C:\Users\Cristina>npm -v

    C:\Users\Cristina>node -v

    C:\Users\Cristina>node hello.js
    throw err;

    Error: Cannot find module ‘C:\Users\Cristina\hello.js’
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

    • TEJASWINI JAGARLAMUDI on August 8, 2017 at 9:46 pm said:

      make sure that hello.js file is in the folder where node.js is installed

    • Ranganathan on August 9, 2017 at 8:06 am said:

      Hi, Cristina..
      Actually the hello.js file doesn’t located on “C:\Users\Cristina\”. You can switch your directory which holds the hello.js file by using this cmd “cd your-directory-name-here” or you can paste the hello.js file into “C:\Users\Cristina” directory.After that type “node hello.js”.

      Lets have fun! and happy coding!

    • Hi Cristina,

      I had the same problem today. I found that when we open the file in any text editor and save it ‘hello.js’ the extension of the file is still ‘hello.js.txt’. So when we run the Node hello.js it can’t recognise as java script file. To resolve this open the file and save it as ‘hello.js’. You can the some logo on the file like “S”. Run again the command ‘Node hello.js’.

      It did resolve the problem.


    • Shirin Akter on August 11, 2017 at 2:45 am said:

      Try updating your npm. When nmp is outdated ,such errors are thrown. Also run npm install in the console and then run gulp

    • you should save hello.js file here
      go to C drive
      go to Users
      open cristina
      then save file

      now run the command

    • Open the notepad and the code – console.log(‘Node is installed!’);
      File–>Save As –> hello.js (Select the location Desktop)
      JavaScript File (.js) file will be created (ex: hello.js)
      Now run it

      C:\Users\your name\Desktop>node hello.js

      Below message will be show.

      Node is installed!

  17. I got this error
    C:\WINDOWS\system32>npm install
    npm WARN saveError ENOENT: no such file or directory, open ‘C:\WINDOWS\system32\package.json’
    npm WARN saveError EPERM: operation not permitted, open ‘C:\WINDOWS\system32\package-lock.json.2655319424’
    npm WARN enoent ENOENT: no such file or directory, open ‘C:\WINDOWS\system32\package.json’
    npm WARN system32 No description
    npm WARN system32 No repository field.
    npm WARN system32 No README data
    npm WARN system32 No license field.

    • So, the issue is that you try to npm install in the system32 folder, which does not contain a package.json file. you do not want to be in the system32 folder. What you should do, for example, is navigate to your desktop, create a new project folder or enter an existing project. If you create a new project folder, enter it and type npm init. This will create a default package.json. After this, type npm install –save where module name is the name of a module you would like to install. Suppose you are planning on building an API with the express module, you would type npm install express –save. This will not only download and install express into your node_modules folder, but the –save will also write it to your package.json file for future reference.

      NodeJS has a pretty steep learning curve, and there aren’t too many guides that will give you best practice walk through. But there are a lot of guides out there that explain how to get started. Javascript is a complicated, deep and elegant language that is still being developed and expanded to simplify the most complicated of programming requirements. I see JS being the future of most, but not all, technology applications. Learn it!

  18. excellent article- thanks for sharing!

  19. On Windows 10 I received :
    C:\Users\andad>npm -v
    openssl config failed: error:02001003:system library:fopen:No such process
    openssl config failed: error:02001003:system library:fopen:No such process

    It is Ok?


  20. Satwik on July 2, 2017 at 1:13 am said:

    throw err;

    Error: Cannot find module ‘C:\Users\SATWIK\hello.js’
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

    • It looks like you may have tried to run >node hello.js
      on your cmd line without actually creating a hello.js file.

      – Create the hello.js file by opening any text editor.
      – Put in the code:
      console.log(‘Node has been successfully installed!’);
      – Save the file as a Javascript file. Make sure you save it in your ‘‘C:\Users\SATWIK’ directory
      – Go back to your cmd prompt and try ‘node hello.js’ again

  21. Noori Banu on June 23, 2017 at 2:37 am said:

    npm install
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js” “install”
    npm ERR! node v6.9.0
    npm ERR! npm v3.10.8
    npm ERR! code ECONNRESET

    npm ERR! network tunneling socket could not be established, statusCode=503
    npm ERR! network This is most likely not a problem with npm itself
    npm ERR! network and is related to network connectivity.
    npm ERR! network In most cases you are behind a proxy or have bad network settin gs.
    npm ERR! network
    npm ERR! network If you are behind a proxy, please make sure that the
    npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’

    npm ERR! Please include the following file with any support request:
    npm ERR! D:\Chihiro\npm-debug.log

    how to solve this ? I dont have admin access

  22. ratkid on June 13, 2017 at 6:18 am said:

    ** I got this error!** What do I need to do? plz.**

    C:\Users\yyt>node first.js
    module.exports = config;

    ReferenceError: config is not defined
    at Object. (C:\Users\yyt\first.js:7:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

  23. Arnie on May 27, 2017 at 8:01 pm said:

    Hi. What is th issue below please? ANOMALY?

    C:\Users\User1\Documents\Lesson 3>node hello.js
    [0x7FFAF40470E3] ANOMALY: use of REX.w is meaningless (default operand size is 64)
    Node is installed!

    • These Anomaly errors are actually being caused by something else in your system. I have found that on mine, they are due to Java applets running in my browser. It is completely unrelated to node.

  24. How do you sidestep the “specified path is too long” error when the installer reaches npm?

  25. Great article. Thx!

  26. Hey! Great article, but I have a question: Do you know, is possible to install and use npm without Node.js? Thanks for your help.

  27. Thank you very much this was really helpful to me great Article

  28. Hi , i want to install node js using command prompt . Is it possible to install it from command line ?

  29. I need to apply validation for a spring form in jsp using node.js.
    Can you tell me how do I work with Node.js server in hybris environment?

  30. Gopi Jangala on September 29, 2016 at 2:25 am said:

    Thanks a lot. You saved lots of my time.

  31. Anonymous on September 9, 2016 at 12:00 am said:

    What’s the difference between installing the runtime and npm package manager ?

  32. Thanks a lot

  33. I am starting work on Angular2. I installed NodeJS following this url: https://blog.teamtreehouse.com/install-node-js-npm-windows

    – Everything work according to mention in above article and I am able run TEST too. I can check version of npm and node by ‘node -v’ and ‘npm -v’ commands but when i start ‘npm start’ its giving below error. And localhost:3001 is not working. I tried localhost:8080, localhost:3000 too but nothing working.

    Below is issue on command

    $ npm start
    npm ERR! Windows_NT 6.1.7600
    npm ERR! argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “start”
    npm ERR! node v4.4.7
    npm ERR! npm v2.15.8
    npm ERR! path D:\myangular\package.json
    npm ERR! code ENOENT
    npm ERR! errno -4058
    npm ERR! syscall open

    npm ERR! enoent ENOENT: no such file or directory, open ‘D:\myangular\package.json’
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! Please include the following file with any support request:
    npm ERR! D:\myangular\npm-debug.log

    • I’m having the same problem on windows 10 pro can you help me fix it?

    • change the folder direction, i mean node -v, and node npm -v can run when you open the cmd windows but you need to run the file from his direction Ex: cd C:\User\User_ADMIN\Downloads and then you can write, node hello.js. it works for me.

    • same problem. please give the solution for it.

      • I am also having same problem…

        Did anyone found solution as I am using Windows10 and node (v4.5.0 and latest version as well) and npm(V2.15.9 and latest version as well).

        I am getting below error….

        npm ERR! Windows_NT 10.0.10586
        npm ERR! argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “run” “start”
        npm ERR! node v4.5.0
        npm ERR! npm v2.15.9

        npm ERR! missing script: start
        npm ERR!
        npm ERR! If you need help, you may report this error at:
        npm ERR!

        npm ERR! Please include the following file with any support request:
        npm ERR! D:\Pocs\reactjs\react-hello-world\npm-debug.log

        Thanks in advance for help.

    • Vishal Goyal on December 28, 2016 at 12:18 am said:

      This error will go away once u restart the machine.

  34. ArunValaven on July 28, 2016 at 3:02 am said:

    Very clear and simple explanation.

  35. Is it possible to install node.js from the windows command prompt? I want to create a script which when ran will install node.js, as well as all of the other tools require for grunt to work.

    The reason for this is to create a library which takes no coding knowledge to install and the library requires grunt.

  36. You don’t really need to restart your computer if you manually add the node’s directory (something like “c:\Program Files\nodejs”) to your path.

  37. Good one, however let me add 1 cent here.
    for those that use visual studio as their IDE, and in order to have an integration with nodejs the latest installed version, go to tools-> options
    find External Tools and add the path to the folder where node.exe is located at.

  38. Hi
    Im trying to install node js version 6.2.0 in my machine and im unable to install it and the setup wizard in ended prematurely and when i check the log its showing like the below
    MSI (c) (48:84) [14:49:27:138]: Windows Installer installed the product. Product Name: Node.js. Product Version: 6.2.0. Product Language: 1033. Manufacturer: Node.js Foundation. Installation success or error status: 1603.

    MSI (c) (48:84) [14:49:27:138]: Grabbed execution mutex.
    MSI (c) (48:84) [14:49:27:138]: Cleaning up uninstalled install packages, if any exist
    MSI (c) (48:84) [14:49:27:139]: MainEngineThread is returning 1603

    Could you please suggest me how can i overcome this error.

  39. Varun Barad on April 14, 2016 at 1:49 am said:

    Thanks, very helpful article.

  40. steward on March 17, 2016 at 1:37 pm said:

    Shows how to run an installer.
    Then what?

    C:\Users\Public\Source>npm -v
    ‘npm’ is not recognized as an internal or external command,
    operable program or batch file.

    • Faye Bridge on March 23, 2016 at 8:17 am said:

      Hi Steward! As this is an article for early last year, we’d recommend asking your question in the Treehouse Community for a fast response as students and teachers are always happy to help there.

  41. i placed the .js in the user/username/ folder but still i am getting.. the below error. please guide me in removing this error.
    throw err;
    Error: Cannot find module ‘C:\Users\\hello.js’
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
    at node.js:961:3

  42. Hi i can’t install my windows 7 system. every time come this error message.

    Node.js Setup Wizard ended prematurely

    Node.js Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard.

  43. very helpful, Thank you 🙂

  44. Ed Hughes on March 7, 2016 at 10:41 pm said:

    Thanks. Very clear. Maybe you add some help for the mess I ran into. The Node.js
    installer aborted right away saying I had a newer version installed. Yes, but I couldn’t find it to remove it. It didn’t work and wanted to install another version. Path was no help in finding it. node -v didn’t work. File explorer search didn’t find it. I made a lucky guess and it worked; but, luck isn’t the way to go. It didn’t show up in PROGRAM and FEATURES for uninstall.

  45. Great. Finally someone has described the entry for using node.js complete and understandable. Thank you.

  46. Great article. Straightforward and effective.

  47. Nathan L. on February 9, 2016 at 5:54 am said:

    Thank you! It was very helpful.

  48. David Edwards on February 5, 2016 at 10:15 pm said:

    I ran the installer, then tried installing the fs package. I ended up with a brace of warning messages mentioning environment variables and missing Readme files.

    Surely this shouldn’t happen if the software installed correctly?

  49. Instruction was simple and easy to set up node and npm.

  50. Thank you, helps me.

  51. I attempted to update Node and NPM by downloading the new installer Stable I’ve downloaded an installed 5.4.0 yet my NPM version remains at 2.13.3 (it should be 3+). I insured the old NPM was removed from the PATH environment variable. Something is amiss.

  52. Julianich Defrancisa on January 3, 2016 at 8:35 am said:

    KrojamSoft FilesSearch Tool helped me in this case.

  53. Junidon on January 2, 2016 at 9:50 pm said:

    I’ve just written my first line of js code, ran it, and it said, “Node is installed!”.

    Thanks a million for this very precise how-to.

  54. The link to the node.js webpage takes the user to an apache server’s file browser. I’d recommend linking the user to the nodejs homepage (finding the installation from there is much easier)

  55. Thanks a lot for these simple, step-by-step instructions and validations. helped me big time!

  56. Thank you a lot, teacher Dave. You helped me a lot with this post. 🙂

  57. brainfreeze on October 26, 2015 at 10:59 pm said:

    Hi, i need to install node as Aptana Studio requires it.
    I typed : node -v
    Referrence Error: node is not defined

    I typed: console.log(‘node.js is running’);
    node.js is running

    This may not be in context but while installing Aptana Studio halfway through it keeps prompting
    “Failed to correctly acquire installer_node.js_windows.msi file: CRC error”

    Do you have any idea what to do with it?
    Thanks for reading.

  58. Rama Krishna on October 26, 2015 at 2:31 pm said:

    Excellent sir. Well explained and point wise description. We survive in this industry due to people like you. Headsup. keep watching you sir.

  59. Jirong Hu on October 19, 2015 at 9:18 am said:

    Error in adduser, why it’s connecting to

    I just installed Node.js and npm won’t allow me to adduser. FYI, we have WebSense installed in our company and uses a self-sign root cert, but no proxy.

    C:\OTPPB2015\Workspace\JavaScript\scapegoat>npm config list
    ; cli configs
    user-agent = “npm/2.14.4 node/v4.1.1 win32 x64”

    ; userconfig C:\Users\huj\.npmrc
    “_auth = “`echo\”=admin:password`”
    ca = “”
    init.author.email = “Jirong_Hu@otpp.com”
    init.author.name = “admin”
    registry = “http://localhost/:8081/artifactory/api/npm/npm”

    ; builtin config undefined
    prefix = “C:\\Users\\huj\\AppData\\Roaming\\npm”

    ; node bin location = C:\Tools\nodejs\node.exe
    ; cwd = C:\OTPPB2015\Workspace\JavaScript\scapegoat
    ; HOME = C:\Users\huj
    ; ‘npm config ls -l’ to show all defaults.

    C:\OTPPB2015\Workspace\JavaScript\scapegoat>npm adduser
    Username: admin
    Email: (this IS public) jirong_hu@otpp.com
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv “C:\\Tools\\nodejs\\node.exe” “C:\\Tools\\nodejs\\node_modules\\npm\\bin\\npm-cli.js”
    npm ERR! node v4.1.1
    npm ERR! npm v2.14.4
    npm ERR! code ECONNREFUSED
    npm ERR! errno ECONNREFUSED
    npm ERR! syscall connect

    npm ERR! Error: connect ECONNREFUSED
    npm ERR! at Object.exports._errnoException (util.js:837:11)
    npm ERR! at exports._exceptionWithHostPort (util.js:860:20)
    npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
    npm ERR! { [Error: connect ECONNREFUSED]
    npm ERR! code: ‘ECONNREFUSED’,
    npm ERR! errno: ‘ECONNREFUSED’,
    npm ERR! syscall: ‘connect’,
    npm ERR! address: ‘’,
    npm ERR! port: 80 }
    npm ERR!
    npm ERR! If you are behind a proxy, please make sure that the
    npm ERR! ‘proxy’ config is set properly. See: ‘npm help config’

    npm ERR! Please include the following file with any support request:
    npm ERR! C:\OTPPB2015\Workspace\JavaScript\scapegoat\npm-debug.log


  60. Sandeep Sharma on October 16, 2015 at 12:11 am said:

    Hey i am installing the node js on my system.I was installed node.js.But in this up side given instruuction did not work.1- is node -v,2- npm -v till work after that hello.js did not work. Please give me solution

  61. Vikas Rana on October 7, 2015 at 9:04 pm said:

    thaku you very much , really helpful.

  62. This is the what i wanted to understand. It’s clear. Thank you Dave!

  63. Ganesh Murthy M on October 2, 2015 at 4:41 am said:

    Thank you, this helped me a lot.

  64. This works ! Thank You!

  65. For the NodeJS MSI, it looks like you just want https://nodejs.org/ now, rather than the /downloads page which gives you links for EXEs, nightlies, etc.

    • go to release folder and choose the latest version ..
      Download MSI file(node-v4.1.1-x86.msi) to install node.js in windows.
      below is the sample url to download the latest version of nodejs.


      • Me too 🙁

        c:\>node hello.js
        throw err;

        Error: Cannot find module ‘c:\hello.js’
        at Function.Module._resolveFilename (module.js:326:15)
        at Function.Module._load (module.js:277:25)
        at Function.Module.runMain (module.js:430:10)
        at startup (node.js:141:18)
        at node.js:980:3

        • Phillip on March 29, 2016 at 12:04 pm said:

          Duh. Read the directions. Read the error.

          Execute “node hello.js” from where it exists or give node a fully qualified path…


          >node C:\foon\blat\tran\hello.js

  66. Thanks!! very useful information.

  67. Thanks! Just what I needed.

  68. To me it is all right, but when I run hello.js (windows 10) this is the answer:
    Error: Cannot find module ‘C:\Users\USERNAME\hello.js’
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3


  69. Hello,
    When I using node hello.js command on command prompt. hello.js is open in dreamweaver. Kindly give me solustion node version and npm version showing properly. I am using 32 bit Windows 7 and downloaded x86 msi and installed it.

    • Just entering hello.js makes Windows evaluate the file name suffix (.js) and start the connected program, Dreamweaver in your case.
      The command should be: node hello.js. Now node is started, node will process hello.js.

  70. Thanks a lot!!

  71. Manula Thantriwatte on September 9, 2015 at 7:26 pm said:

    Thank you very much. This help me a lot.

  72. srikkanthan on September 4, 2015 at 10:10 am said:

    Thank you very much. This was very much useful.

  73. Preguntón Cojonero Cabrón on September 4, 2015 at 10:03 am said:

    Good for install Zero !

    Mindly notes:

    Any good getting started with it? any step-by-step guide, or Getting Started – Quick Start that can be completed in 15-20 minutes? I get you a good step-by-step guide sample like berniecook.wordpress.com/2013/01/13/… I wanted to quickly cover off several assumptions before we get started: install (requisites, tools required), configure, an running quickly. Target will be an “go and ready” sample. Maybe better an real application sample

    IMHO, better samples for minimize learning curve are real applications with full source code and good patterns&practices.

    Full source code sample REAL application? not Demo, only real applications?
    Like for small to medium applications development, but open source, if you can sharing or maybe another real project or production-ready application using.

    main influences, are full of innovative ideas that can free our minds to explore new techniques, patterns and paradigms.

    You want to use technologies that allow for rapid development, constant iteration, maximal efficiency, speed, robustness and more. You want to be lean and you want to be agile. You want to use technologies that will help you succeed in the short and long term. And those technologies are not always easy to pick out.

    Only mindly notes.

  74. Tanay Gaherwar on August 27, 2015 at 6:19 am said:

    Thanks a ton. was really helpful :))

  75. Thanks for this article, really helpful.

  76. Michael on August 8, 2015 at 5:36 am said:

    Great article!

  77. Could I kjow what you do to attract neew users to your site?
    It seems like you gett quite some traffic, andd I aam very
    interested in knowing how you hawve been able to brand your website aand enure visitors.

  78. Very helpful i was going crazy trying to get node.js to work, thanks a lot.

Leave a Reply

You must be logged in to post a comment.

Want to learn more about Javascript?

Learn how to use JavaScript to add interactivity to websites.

Learn more