Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AWS by (19.1k points)

I am getting a

forever: command not found error when I run a nodejs process using the forever command as a cronjob (in an amazon ec2 machine): the bash script I am using has the following code:

cd to/location/of/the/nodejs/file

forever start file.js

but I am able to run this file by using bash script.sh but I get the forever: command not found an error when I run it via cronjob

I am confused don't know what could be the reason for this.

Has anybody else faced this problem?

1 Answer

0 votes
by (44.3k points)

I was facing the same issue. You can add a -g tag to your command which will install forever globally.

npm install forever -g

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
+3 votes
2 answers
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...