So I have a jenkins build that is calling a forever start with the following command.
sudo NODE_ENV=development forever start -a -l /var/nodejs/app/logs/forever.log -o /var/nodejs/app/logs/output.log -e /var/nodejs/app/logs/error.log /var/nodejs/app/app.js 
This command throws the following error.
running on the development server
fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'ssl/gd_bundle.crt'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.readFileSync (fs.js:284:15)
    at Object.<anonymous> (/var/nodejs/app/app.js:190:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
error: Forever detected script exited with code: 8
I can get the same error when I run it from the command line on the server, however only if I am not in the directory with the app.js file. If I am specifying the path for the app.js file why is forever sensitive to where the file is located.
I also found that forever is not respecting the -p flag or the forever config directory. Any thoughts?
 
     
    