Forever: command not found

For other users who face this problem:

you have to add the path of forever module and then run the script as a cronjob.

In linux the path normally is:

/usr/local/lib/node_modules/forever/bin/forever start file.js

just use this command in your script and the error forever:command not found will not bother you.

I know there must be some other fancy ways to do this but I am happy with this hack


in case azero0's solution doesn't work for you and you're running linux, try

sudo npm install forever -g

Run this command: npm install forever -g

-g is to install it globally.