node.jsnodeclipse

Nodejs app fails to run in Nodeclipse


I setup Nodeclipse and wrote a simple hello app. When I try to run as a Node Appplication, I get the following error

Exception occurred executing command line. Cannot run program "node" (in directory "C:\path\to\app"): CreateProcess error=2, The system cannot find the file specified

If I run from the Nodejs console, the app runs.

Is there a way I can make it runnable from Nodeclipse?


Solution

  • I know this question is a month old, but I was getting the same error and managed to fix it.

    Try going to Window -> Preferences -> Nodeclipse and unchecking the box that says "find node on PATH...". Then make sure the "Node.js path" below is set to the location of the node.exe file (for me it was C:\Program Files (x86)\nodejs\node.exe).

    I'm not sure why this worked (I checked my PATH and nodejs is definitely in there), but maybe it will help someone else.