Nodejs app fails to run in Nodeclipse

让人想犯罪 __ 提交于 2019-12-06 21:27:36

问题


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?


回答1:


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.




回答2:


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




回答3:


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



回答4:


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!




回答5:


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.

Added IDE image (1 option) so that its easily to fix.




回答6:


Same here, I restarted Eclipse and it worked ok, maybe Eclipse loads PATH when started - in my case I installed Nodejs after load eclipse



来源:https://stackoverflow.com/questions/23949819/nodejs-app-fails-to-run-in-nodeclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!