2

所以我有:

var forever = require('forever-monitor');
var Monitor = forever.Monitor;

var child = new Monitor('clusters.js', {
  max: 10,
  silent: false,
  killTree: true,
  logFile: './logs/forever.log',
  outFile: './logs/app.log',
  errFile: './logs/error.log'
});

child.on('exit', function (err) {
  console.log('Server exitted');
});

child.start();

它总是抛出同样的错误:events.js:72 throw er; // 未处理的“错误”事件:

Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
npm ERR! weird error 8
npm ERR! not ok code 0

有谁知道发生了什么以及如何解决它?我在 Windows 7 上:

"express": "3.3.5",
"forever-monitor": "~1.2.2"
4

1 回答 1

2

https://github.com/blai/grunt-express/issues/12

显然问题出在forever-monitor 1.2,我降级到1.1,它就可以了。从我到那里的情况来看,他们似乎也没有对此做任何事情......

于 2013-09-25T11:43:17.380 回答