forever start error #283

Closed
mackjoner opened this Issue May 17, 2012 · 12 comments

Comments

Projects
None yet
10 participants

localhost:membership yangzhaojie$ node -v
v0.6.17
localhost:membership yangzhaojie$ npm -v
1.1.21
localhost:membership yangzhaojie$ forever

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './daemon.v0.6.17'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/usr/local/lib/node_modules/forever/node_modules/daemon/lib/daemon.js:12:11)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
localhost:membership yangzhaojie$

I had the same problem. After I restart my computer it works again.

Contributor

AvianFlu commented May 17, 2012

Yeah, there are two possibilities for this. You either need to npm rebuild -g so that the compiled addons are re-built for your node version, or, if you've done that and it still doesn't work, hash -r, start a new terminal session, or restart.

If that doesn't fix it, let us know.

AvianFlu closed this May 17, 2012

I did npm rebuild -g and hash -r, after I was restarted my computer, but the forever still doesn't work.

AvianFlu reopened this May 18, 2012

Contributor

AvianFlu commented May 18, 2012

npm uninstall forever -g && npm install forever -g

Can you run that and gist me the output?

hi, @AvianFlu
The above problems have been solved. But the forever not worked in my production env.
os:Joyent SmartOS
[root@e594a0aa-fa39-4b9e-b6c0-090706bd062e /opt/nodeserver]# node -v
v0.6.6
[root@e594a0aa-fa39-4b9e-b6c0-090706bd062e /opt/nodeserver]# npm -v
1.1.0-beta-4
[root@e594a0aa-fa39-4b9e-b6c0-090706bd062e /opt/nodeserver]# forever -h

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /opt/local/lib/node_modules/forever/node_modules/daemon/lib/daemon.v0.6.6.node
at Object..node (module.js:463:11)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (/opt/local/lib/node_modules/forever/node_modules/daemon/lib/daemon.js:12:11)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
[root@e594a0aa-fa39-4b9e-b6c0-090706bd062e /opt/nodeserver]#

Regarding

Error: Cannot find module './daemon.v0.6.17'
at Function._resolveFilename (module.js:332:11)

I'm had exactly that problem. It turned out to be an out of date version of forever earlier in my path. I had one in /usr/bin and one in /usr/local/bin. Deleting the older one and rehashing fixed it.

leric commented Jun 1, 2012

I had this problem too, after update node from 0.6.10 to 0.6.18, reinstall forever fixed it

AvianFlu closed this Jun 16, 2012

devdemi commented Sep 6, 2013

I upgrade node.js 0.10.18.
I did npm rebuild -g and hash -r and reinstall forever but it still doesn't work.
Error: Cannot find module './daemon.v0.10.18'

I have this problem too:

Error: Cannot find module './daemon.v0.10.18'

On Ubuntu
The old version in "/usr/local/bin/forever & /usr/local/bin/foreverd" need to be removed.

sudo rm /usr/local/bin/forever /usr/local/bin/foreverd
sudo rm /usr/bin/foreverd /usr/bin/foreverd
npm rm forever -g
npm i forever -g

I also had to update my init scripts from /usr/local/bin to /usr/bin.

👍 Thanks @johnbonesnj It's fixing the problem for me.

👍 Thanks @johnbonesnj, It fixed the problem for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment