23
votes

I try to run nodejs on a brand new installation of Windows 7. This is what I've done:

  1. Install node using the windows installer

  2. Make sure the files were extracted to C:\Program Files (x86)\nodejs\

  3. Make sure that my Path enviorment variable contains C:\Program Files (x86)\nodejs\

  4. open up a command prompt and run node -v

This gives me the 'node is not a recognized ...' - message.

What am I missing here?


Update running echo %path% gives me a directory listing that doesn't include C:\Program Files (x86)\nodejs\, even though looking at the "environment variables" tab in the system properties displays it under path. Thats odd.

2
Do you really think your laptop model matters? :pThiefMaster
What's the full path to the binary? Is it in ...\nodejs\, or ...\nodejs\bin\, for example?jimw
@ThiefMaster: Hehe, no, not really. But when I have this kind of error that I really dont have a clue of the reason, I just try to include as much data as possible. The laptopmodel was probably just unnessesary though.Soroush Hakami
@jimw: I dont even have a nodejs\bin. In the nodejs dir, I have just a node application file.Soroush Hakami
Right, not that then. What does 'echo %PATH%' give you in your command shell? Sorry for the obvious questions :-)jimw

2 Answers

33
votes

UPDATE: a quicker solution is per Timos comment: "Restarting explorer.exe is enough, you can stop it in task manager and start it again"

This was solved by restarting the computer.

Apparently, using the Node installer sets the path so that it is visible under system properties, but not in the command prompt (running echo %path%) until you restart your computer. Not sure if this is a problem with Windows, or the Node Installer.

14
votes

Timo's statement is accurate. For completeness...

To start explore.exe again, Ctrl+Shift+Esc to open Task Manager

Then do File > New Task (Run)> type: explorer.exe > Enter > Voila!