nodejitsu/forever — Issue #220: execvp() error, endless loop
Author: newleafdigital
Created: 2012-01-12 19:48:45+00:00
State: open

I'm trying to use forever to run a production app, like so -

```sudo forever -c "NODE_ENV=production node" ./app.js```

```DIR=$(cd $(dirname $0); pwd)
sudo forever start -l $DIR/log/forever.log -o $DIR/log/output.log -e $DIR/log/error.log --append -c "NODE_ENV=production node" $DIR/app.js```

(I'm using sudo because it runs on port 80 which requires root.)

In both cases, I get this error (to stderr or error.log):

> execvp(): No such file or directory
> warn: Forever detected script exited with code: 127
> warn: Forever restarting script for X time

(and that runs endlessly)

if I simply run ```sudo NODE_ENV=production node app.js``` it works fine.

Any ideas?
Thanks!