Node.js with Forever on ubuntu
Asked Answered
H

2

7

I'm trying to install Forever to use with Node.js. I'm installing it using 'npm install forever -g'. It seems to install fine, but when I run the command 'forever' it's not found.

Maybe I'm not installing it in the right location? Where should it be installed to?

Any help would be great! Thank you!

Hardheaded answered 8/3, 2012 at 4:25 Comment(0)
P
7

That should work, but check 'npm bin -g' to make sure that directory is on your path.

Plagioclase answered 8/3, 2012 at 4:32 Comment(4)
It's not included there. I see express, node, node-waf and npm. I don't see socket.io either (if I'm suppose to), but socket.io is working. What path should I run npm install from? I know it creates node_modules in whatever path I run it in.Hardheaded
Do you run npm install with 'sudo'? It shouldn't matter which directory you're in if you use '-g', but I usually switch to a directory without a 'node_modules' just to make sure it doesn't go there. You won't see anything from socket_io in the bin directory; it doesn't install any tools like that.Plagioclase
Well, I just ran it again and it worked. Who knows! Thanks :)Hardheaded
i ran "npm install forever" and it was giving forever not found and then i ran "sudo npm install forever -g " and it worked fine.Tepee
E
9

You have to run forever install using sudo:

sudo npm install forever -g
Escaut answered 30/3, 2014 at 6:16 Comment(0)
P
7

That should work, but check 'npm bin -g' to make sure that directory is on your path.

Plagioclase answered 8/3, 2012 at 4:32 Comment(4)
It's not included there. I see express, node, node-waf and npm. I don't see socket.io either (if I'm suppose to), but socket.io is working. What path should I run npm install from? I know it creates node_modules in whatever path I run it in.Hardheaded
Do you run npm install with 'sudo'? It shouldn't matter which directory you're in if you use '-g', but I usually switch to a directory without a 'node_modules' just to make sure it doesn't go there. You won't see anything from socket_io in the bin directory; it doesn't install any tools like that.Plagioclase
Well, I just ran it again and it worked. Who knows! Thanks :)Hardheaded
i ran "npm install forever" and it was giving forever not found and then i ran "sudo npm install forever -g " and it worked fine.Tepee

© 2022 - 2024 — McMap. All rights reserved.