Node forever does not work on Ubuntu 12.04.1

When I had fun on Ubuntu 12.04.1, I got the error below after updating node.js from v0.6.12 to v0.8.15. It works well before updating. Has anyone encountered such a problem 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

 node v0.8.15 npm 1.1.66 

I installed node and npm with a command line hit

 $ 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 
+6
source share
2 answers

'sudo npm update -g forever' does not work for me. I uninstalled all installed modules and installed them again. Forever works. The steps are as follows.

Delete all modules that exist forever.

 $ sudo rm -R /usr/lib/node_modules/forever $ sudo rm -R /usr/local/lib/node_modules/forever 

Install again forever.

 $ sudo npm install forever -g 
+10
source

You will get its solution with the commands below, but some problems, so please try PM2 with so many advantages and debut milestones

  $ sudo rm -R /usr/lib/node_modules/forever $ sudo rm -R /usr/local/lib/node_modules/forever 

Please use this for the debut of the node.js exception and follow the process of each one with clustering and leading and driven logic

http://devo.ps/blog/2013/06/26/goodbye-node-forever-hello-pm2.html

  $ sudo npm install -g pm2 
+1
source

All Articles