4

I was running Node.js and Node-RED (depends on Node.js) normally one week ago. My system is Windows 8.1 64 bits.

Nevertheless, today I am having a issue:

As normally, I go to the node-red folder, and run node red.js. Then, surprisingly I got the following message from the prompt:


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 nodes or node to offline state
        pause         - Pause node [deprecated]
        resume        - Resume node [deprecated]

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

So, after evaluating many things, such as, environment variables, npm and node folders, etc it seems to be ok. BUT, when I run npm -v, the console shows the npm version installed. And when I run node -v, I get the same message as above... I remember when I first installed Node.js I could see the node.js version installed.

In these days, I performed a dual boot with Linux Ubuntu 14.04 and I think this is may the problem (I performed I CCLEANER analysis that remove some Windows registers).

Currently, my personal/user path variables related to them are: C:\Program Files\nodejs

System environment variables are: C:\Program Files\nodejs

PS:

  • The Node.js console (node.exe) opens normally.
  • I tried to run the prompt as administrator and with my user.
  • I need to run the 0.10x version of node.js. And this issue is related with this version (0.10x).

Thanks.

SomeShinyObject
  • 7,581
  • 6
  • 39
  • 59
pascoal
  • 411
  • 2
  • 8

2 Answers2

11

Most likely you have the Microsoft HPC Pack installed, which has its own node.exe and it's this executable that is being picked.

If you're not using that, I'd suggest removing it to make things less confusing. Otherwise if you're sure you have installed node.js from the node.js website (e.g. the Windows installer), then make sure that the node.js path in your %PATH% comes before the path for Microsoft HPC Pack's node.exe to make sure it picks up the "right" node.exe.

mscdex
  • 104,356
  • 15
  • 192
  • 153
  • Thank you very much! You saved my day. I spent the whole morning trying to fix it. The surprise was, as I said, it was working nicely until today. – pascoal Apr 11 '15 at 21:49
  • @pascoal - the point of my suggestion to run "where node" was to see that it wasn't running the proper node.exe. Apparently you did not understand what I was suggesting you do because that would have also shown this issue. – jfriend00 Apr 12 '15 at 01:41
1

Microsoft HPC Pack bin(C:\Program Files\Microsoft HPC Pack 2008 R2\Bin) folder has node.exe executable file and it is set in path before nodejs path. I removed it and it is working as expected.

Sandeep M
  • 248
  • 3
  • 6