简体   繁体   English

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

[英]forever module on node.js doesn't work - warnings

I use windows 7 and nodejs 0.10.12. 我使用Windows 7和nodejs 0.10.12。 I installed the latest version of forever module like so 我安装了最新版本的forever模块

npm install -g forever

and then I typed 然后我输入

forever start helloserver.js

And I get the following 我得到以下内容

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

Now , I type 现在,我输入

forever list

just to check and I get 只是检查,我得到

info: No forever processes running

Also note that during the installation of forever I got these warnings 另请注意,在永远安装期间,我收到了这些警告

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

I guess the forever module is not installed correctly so cannot run the server? 我想永远模块没有正确安装,所以无法运行服务器? I don't get it and I cant think of a solution. 我没有得到它,我想不出一个解决方案。 Any suggestions/tips? 有什么建议/提示吗? Should I use node 0.8.x? 我应该使用节点0.8.x吗? Or there is a workaround? 或者有一个解决方法?

Thanks 谢谢

I think Forever, last version (0.10.0), work on Windows instability but not Linux. 我认为Forever,最新版本(0.10.0),适用于Windows不稳定但不适用于Linux。 You can try following but i recommend you should choose another resolve. 您可以尝试以下但我建议您应该选择另一种解决方案。

forever start -c node script.js

Note: you can't list and stop in forever with "forever list". 注意:您无法使用“永久列表”列出并永久停止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM