0 votes
1 view
in AWS by (19.2k 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.6k 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

Welcome to Intellipaat Community. Get your technical queries answered by top developers !