所以我有:
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"