node.js上的forever模块不起作用 - 警告

时间:2013-07-15 17:48:21

标签: node.js

我使用的是Windows 7和nodejs 0.10.12。我安装了最新版本的forever模块,如此

npm install -g forever

然后我输入

forever start helloserver.js

我得到以下

warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: helloserver.js

现在,我输入

forever list

只是为了检查而我

info: No forever processes running

另请注意,在永久安装期间,我收到了这些警告

package.json eyes@0.1.8 No repository field.
package.json eventemitter2@0.4.11 No repository field.
package.json eventemitter2@0.4.11 'repositories' (plural) Not supported
package.json Please pick one as the 'repository' filed
package.json aws-sign@0.2.0 No readme data
package.json cookie-jar@0.2.0 No readme data
package.json oauth-sign@0.2.0 No readme data
package.json tunnel-agent@0.2.0 No readme data
package.json forever-agent@0.2.0 No readme data
engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v.0.10.12","npm":"1.2.32"})
engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v.0.10.12","npm":"1.2.32"})
engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v.0.10.12","npm":"1.2.32"})
engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v.0.10.12","npm":"1.2.32"})
engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v.0.10.12","npm":"1.2.32"})

我想forever模块安装不正确所以无法运行服务器?我没有得到它,我想不出一个解决方案。有什么建议/提示吗?我应该使用节点0.8.x吗?或者有一种解决方法?

由于

1 个答案:

答案 0 :(得分:3)

我认为Forever,最新版本(0.10.0),适用于Windows不稳定但不适用于Linux。您可以尝试以下但我建议您应该选择另一种解决方案。

forever start -c node script.js

注意:您无法使用“forever list”列出并永久停止。