6

我使用 Windows 7 和 nodejs 0.10.12。我像这样安装了最新版本的永远模块

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"})

我猜永远模块没有正确安装所以不能运行服务器?我不明白,我想不出解决办法。有什么建议/提示吗?我应该使用节点 0.8.x 吗?还是有解决方法?

谢谢

4

1 回答 1

3

我认为永远,最后一个版本(0.10.0),适用于 Windows 不稳定但不适用于 Linux。您可以尝试关注,但我建议您应该选择另一个解决方案。

forever start -c node script.js

注意:你不能用“forever list”列出并永远停止。

于 2013-12-26T03:45:42.957 回答