Ankur Marwaha Ankur Marwaha - 1 month ago 15
Javascript Question

Node command is not working in cmd after installing node on windows?

I have installed node v4 from node's official site.
Now when i try to run

node
command in cmd it displays the following:-

C:\Users\PcName>node
Node Commands

Syntax:
node {operator} [options] [arguments]

Parameters:
/? or /help - Display this help message.
list - List nodes or node history or the cluster
listcores - List cores on the cluster
view - View properties of a node
online - Set nodes or node to online state
offline - Set one or more nodes to the offline state

For more information about HPC command-line tools,
see http://go.microsoft.com/fwlink/?LinkId=120724.


Unable to understand whats the issue here.

For reference here is my path variable's value :-

PATH=c:\Program Files\Microsoft HPC Pack 2012\Bin\;c:\PROGRA~1\ds_shell\code\bin\ds_shell;C:\Oracle11gR2_64bCli\client_1\bin;C:\Oracle11gR2_32bCli\client_1\bin;C:\Program Files\Microsoft MPI\Bin\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\ama16\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Program Files\nodejs\node_modules\npm\bin

Answer

Clearly there's a command called NODE in

c:\Program Files\Microsoft HPC Pack 2012\Bin\

Either rename that command, or use the nodejs command prompt (click start, type nodejs and you should see the option come up), or rename Node.exe in the node install folder to nodejs.exe, and then use nodejs on the command line