我正在运行一个小小的Socket.io&在Ubuntu服务器上运行应用程序,我试图永远使用模块。
然而,似乎我安装哪个软件包并不重要,似乎没有发生任何事情。我跑了
sudo npm install forever -g
安装时我收到此消息:
npm WARN引擎hawk@0.10.2:想要:{"节点":" 0.8.x"}(当前:{"节点":&# 34; v0.10.25"" NPM":" 1.3.10"}
然而,永远键入该函数启动app.js只会返回到下一行。
$:/home/app$ forever start app.js
$:/home/app$
键入哪个永远返回
/usr/local/bin/forever
我似乎对nodemon和foreman有类似的问题,我不知道为什么。我缺少什么想法?
答案 0 :(得分:0)
由于节点0.8的硬依赖性而发生警告,但习惯上只是忽略它们。只是为了尝试,我永远安装在一个新的Ubuntu 14.04并得到了很多警告
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
但在那之后,如果我打电话给永远的帮助屏幕
forever -h
它正常显示。
您是否在与app.js相同的路径中永远执行?
如果您在永远跑步后致电forever list
会怎样?
你用的是什么用户?
你确定运行节点app.js正常运行吗?
答案 1 :(得分:0)
听起来不像是仇恨但我永远停止使用,因为他们停止了开发。如果您在启动过程中使用它启动应用程序,则无法查看终止或重新启动的过程,这有一些问题。
尝试nodemon,它最适合我,并且有大多数相同的选项。我知道这不是你要找的答案,但我希望你能避免我遇到的同样问题。祝你好运