[英]Node forever doesn't work on Ubuntu 12.04.1
When I fun forever on Ubuntu 12.04.1, I got the error below after upgrading node.js from v0.6.12 to v0.8.15. 当我在Ubuntu 12.04.1上永远玩得开心时,我将node.js从v0.6.12升级到v0.8.15后得到了以下错误。 Before upgrading it works well. 在升级之前它运作良好。 Does anyone encounter this kind of issue before? 以前有人遇到过这种问题吗?
$ forever
module.js:340
throw err;
^
Error: Cannot find module './daemon.v0.8.15'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/usr/local/lib/node_modules/forever/node_modules/daemon/lib/daemon.js:12:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
My environment is 我的环境是
node v0.8.15
npm 1.1.66
I installed node and npm with the command line blow 我用命令行打击安装了node和npm
$ sudo apt-get install python-software-properties -y
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs npm -y
I installed forever with the command line 我用命令行永远安装
$ sudo npm install forever -g
'sudo npm update -g forever' doesn't work for me. 'sudo npm update -g forever'对我不起作用。 I deleted all the installed modules and install it again. 我删除了所有已安装的模块并重新安装。 The forever works. 永远有效。 The steps are as below. 步骤如下。
Delete the all the existing forever modules. 删除所有现有的永久模块。
$ sudo rm -R /usr/lib/node_modules/forever
$ sudo rm -R /usr/local/lib/node_modules/forever
Install the forever again. 再次安装永远。
$ sudo npm install forever -g
You will get he solution with below commands but some issue, so please try the PM2 with so many advantages and check points of debuting 你可以通过以下命令获得解决方案,但有些问题,所以请尝试PM2,它具有很多优点和检查点
$ sudo rm -R /usr/lib/node_modules/forever
$ sudo rm -R /usr/local/lib/node_modules/forever
Please use this for debuting the node.js exception and monitoring the process of each and every with clustering and master and slave logic 请使用它来推出node.js异常,并使用群集和主从逻辑监视每个进程
http://devo.ps/blog/2013/06/26/goodbye-node-forever-hello-pm2.html http://devo.ps/blog/2013/06/26/goodbye-node-forever-hello-pm2.html
$ sudo npm install -g pm2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.