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!
js application locally after closing the terminal or Application, to run the nodeJS application permanently. We use NPM modules such as forever or PM2 to ensure that a given script runs continuously. NPM is a Default Package manager for Node.
Forever is an npm module that ensures a Node. js script continuously runs in the background on the server. It's a helpful CLI tool for the production environment because it helps manage the Node applications and their processes.
What is npm forever? Forever is an npm package used to keep your script running continuously in the background. It's a handy CLI tool that helps you to manage your application in the development and production stages. To start running a script with forever, use the forever start command, followed by the script name.
You have to run forever install using sudo:
sudo npm install forever -g
That should work, but check 'npm bin -g' to make sure that directory is on your path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With