Nodejs app fails to run in Nodeclipse
Asked Answered
O

7

10

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?

Orvilleorwell answered 30/5, 2014 at 8:4 Comment(1)
also check other answeres for SO questionsDalhousie
P
27

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.

Pretor answered 20/6, 2014 at 18:52 Comment(3)
Its 2016 and its still a problem. thankyou for the fixMillet
Thanks so much...it was still hanging on to my jboss config! :)Crayfish
May Eclipse load path value from system when initialized and that time path doesn't have node path yet.Trenna
V
5

this error is show cause your node.exe is not configured in PATH simple solution is configure it or use below method go to windows -> preferences -> nodeclipse and uncheck the checkbox (find node on PATH) it works

Viewable answered 14/7, 2014 at 7:44 Comment(0)
D
1

Do you have Node.js installed? What is path to it?

Check Window -> Preferences -> Nodeclipse and compare.

http://www.nodeclipse.org/#support have also other option to follow with

Quote:

  • How do I? -- 1) F1/Help -> Help Contens -> Nodeclipse Help , 2) Online Help or 3) StackOverflow! *1
    *1 Don't forget to add `nodeclipse` tag.
  • I got this error, why? -- StackOverflow! *1
  • I got this error and I'm sure it's a bug -- raise an issue!

Should you report a bug, please include the following:

  1. Nodeclipse version number (like 0.4 or 0.8)
  2. Eclipse version number (like 4.3.1 Kepler or 4.4.0)
  3. Eclipse distribution (e.g. Eclipse for Java EE Developers)
  4. A detailed description of the steps necessary to reproduce the problem.
  5. Screenshot and stack trace, that you can get from Eclipse Error Log View (Window -> Show View ...) or from '.log' file from the directory '.metadata' in your workspace.
  6. See example issue #78
Dalhousie answered 30/5, 2014 at 8:41 Comment(1)
The path in preferences matches the current installation path. I have even gone as far as playing around with other preference settings but it still doesn't work. I will see of I can report the bug to support.Orvilleorwell
M
0

After you install node.js plugin in eclipse, then go to https://nodejs.org/en/ official website, and install v4.2.6 LTS open source libraries, after double click install, then restart eclipse, then done!

Mediatorial answered 26/1, 2016 at 20:38 Comment(0)
M
0

in system Path variable -nodejs would be mentioned as C:\Program Files\nodejs\ whereas we need to include node.exe i.e C:\Program Files\nodejs\node.exe So either we can

  1. uncheck the checkbox "find node on PATH.Otherwise use Node.js instance in location below.

or

  1. add the node.exe in system path variable.

enter image description hereAdded IDE image (1 option) so that its easily to fix.

Mulish answered 19/6, 2018 at 21:22 Comment(0)
T
0

Same here, I restarted Eclipse and it worked ok.

Eclipse loads variable PATH when started - in my case I installed Nodejs when executing Eclipse.

Trenna answered 21/9, 2018 at 15:57 Comment(0)
P
0

In addition to Jordan's answer above (configure Node.js path) I also needed to configure the Javascript runtime library with a Node.js runtime before being able to "Run As" a "Node.js Application" and point to the node.exe path. The same path as the separate Node.js path Jordan mentioned.

Preferences > JavaScript > Runtimes > [select Node.js Runtime] > Add : path to node.exe

Pettus answered 27/9, 2020 at 3:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.