Ankur Marwaha
Ankur Marwaha

Reputation: 1875

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

Upvotes: 3

Views: 16794

Answers (3)

shanuka bps
shanuka bps

Reputation: 1

set your system's PATH variable. Make sure the node path is added, if not added it.

check your PATH you can view it by right clicking the MYComputer-->Properties-->Advance system settings-->Environment Variables-->

In "User variables" or "System variables" find variable PATH and add node.js folder path as value.

restart IDE AND CMD

**** befor use the nodejs command in cmd make sure the node path is added in System varable***

Upvotes: 0

Jaromanda X
Jaromanda X

Reputation: 1

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

Upvotes: 3

ardilgulez
ardilgulez

Reputation: 1944

The command "node" invokes an interactive shell only if you run it from node's own command shell. If you're not running "node" on that shell, you have to specify which javascript file to run with it.

Upvotes: -3

Related Questions