I installed Node.js from the installer on the project's main website. I checked all of the options on install to make sure it could be used correctly. However, when I go into an administrator command prompt and type in node, I get:

'node' is not recognized as an internal or external command, operable program or batch file.

I'm confused. Shouldn't node work from the command line by default?

up vote 3 down vote accepted

It's not that it won't run, just that it cannot find it. I assume you used the standard msi installer from here:

yes? If so, you probably installed it in a default place, such as C:\Program Files (x86)\nodejs\ or C:\Program Files\nodejs\. In Windows Explorer, try to find these. Whichever you find, open a command window and run this (change the first command with the path to the one you found):

cd C:\Program Files (x86)\nodejs\
node

That should work. If it worked, change your path as described here (if on Windows 7):

Some helpful references:

  • That was the problem. Thank you! – nerdenator Oct 31 '14 at 15:43
  • Nice, you're welcome! – steady rain Oct 31 '14 at 15:44
  • `64-bit = cd C:\Program files\nodejs\, 32-bit = cd C:\Program Files (x86)\nodejs` – YumYumYum Jun 28 '16 at 7:34

Make sure that you have Node installed correctly. You can test it by simply running a commands to see what version of node is installed.

To test it, use windows command promt and type node -v. It should print a version number like v0.12.2 That means you have successfully installed the node.

If not you have to set the environment variable. Edit environment variable PATH: add %APPDATA%\npm to the front of the PATH.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.