3

当我尝试在 nodeclipse 中运行 express 应用程序时,它给了我错误,

1 月 23 日 11:58:04 - [33m[nodemon] v1.0.13[39m

23 Jan 11:58:04 - [33m[nodemon] 随时重启,输入rs[39m ]

1 月 23 日 11:58:04 - [33m[nodemon] 观看:. [39m

1 月 23 日 11:58:04 - [32m[nodemon] 开始node /home/rdteam/workspace/NedvedNodeExpressTest/app.js[39m

[31m [nodemon] 无法运行可执行文件:“node”[39m

但是,当我从命令行运行时, node /home/rdteam/workspace/NedvedNodeExpressTest/app.js 或者 nodemon /home/rdteam/workspace/NedvedNodeExpressTest/app.js

两者都可以正常工作。

请帮忙。

问候锤

4

4 回答 4

2

就我而言(运行 os x),我快速解决了它,将完整路径设置为:

/usr/local/lib/node_modules/nodemon/lib/monitor/run.js

function run(options) {
    var cmd = config.command.raw;

    //Added line
    cmd.executable = '/usr/local/bin/node';
于 2014-01-25T16:30:00.340 回答
1

我能够通过使用forever模块来解决这个问题,并将 Nodeclipse 的“节点监视器路径”配置为永远指向(*../npm/node_modules/forever/bin/forever*

  • npm install forever
  • 打开Eclipse -> 首选项 -> Nodeclipse
  • 将“节点监视器路径”设置为永久安装,就完成了。

我在设置 Nodeclipse 并让我的节点程序在 Mac OS X 10.8.5 (Mountain Lion) 上运行的 Eclipse Kepler 上运行时遇到了这个问题

于 2014-01-29T10:48:42.707 回答
0

用例“使用 nodemon 的 Nodeclipse”:

nodeclipse 0.9 Eclipse 4.2.2 Java 1.7 on win32

使用监视器路径配置 NodeclipseC:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js

logilog.js 与console.log('done');

运行方式 -> 带监视器的节点

生成的命令行(在 Nodeclipse 控制台中看到):

node --harmony C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js D:\Workspaces\ADT-Bundle\CountingServer\try\logilog.js

控制台输出

    23 Jan 16:23:35 - [33m[nodemon] v0.7.10[0m

      Error: ENOENT, no such file or directory 'D:\Workspaces\ADT-Bundle\CountingServer\try\undefined\nodemonCheckFsWatch1390465415226'
          at Object.fs.openSync (fs.js:427:18)
          at Object.watchFileChecker.check (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:154:22)
          at ready (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:49:22)
          at testAndStart (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:71:5)
          at Object.<anonymous> (C:\Users\weibl\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:847:1)
          at Module._compile (module.js:456:26)
          at Object.Module._extensions..js (module.js:474:10)
          at Module.load (module.js:356:32)
          at Function.Module._load (module.js:312:12)
          at Function.Module.runMain (module.js:497:10)
      23 Jan 16:23:35 - [33m[nodemon] to restart at any time, enter `rs`[0m
      23 Jan 16:23:35 - [32m[nodemon] watching: D:\Workspaces\ADT-Bundle\CountingServer\try[0m
      23 Jan 16:23:35 - [nodemon] exception in nodemon killing node

创建问题 #118 https://github.com/Nodeclipse/nodeclipse-1/issues/118

这就是报告问题的方式。

感谢您告知您需要这个。查看http://www.nodeclipse.org/上的新闻以及如何提供帮助。

于 2014-01-23T08:28:05.220 回答
0

如果您使用以下 JSON在应用程序文件夹(例如)中创建nodemon.json/home/rdteam/workspace/NedvedNodeExpressTest/nodemon.json配置文件,它应该可以工作而无需修改 Nodemon 源文件。

{  
"exec": "/usr/local/bin/node"
}

这适用于 OS X,您可能需要根据安装节点的位置更改路径。

Nodemon 配置文件的详细信息: https ://github.com/remy/nodemon#config-files

于 2014-05-18T15:00:08.560 回答