You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a problem with the uptime app, related to the config module.
I'd like to run uptime as a service on my Ubuntu 12.04 server, but my problem is that I can't launch the app from anywhere on my server. It seems that I need to be in the uptime directory, otherwise I get this error:
$ /usr/local/bin/node /var/www/uptime/app.js
Cannot write runtime.json file Error: ENOENT, no such file or directory '/home/gregoire/config/runtime.json'
fs.js:837
throw errnoException(errno, 'watch');
^
Error: watch ENOENT
at errnoException (fs.js:806:11)
at FSWatcher.start (fs.js:837:11)
at Object.fs.watch (fs.js:861:11)
at Config.watchForConfigFileChanges (/var/www/uptime/node_modules/config/lib/config.js:468:37)
at /var/www/uptime/node_modules/config/lib/config.js:1089:20
at Module._compile (module.js:420:14)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
It searches "config/runtime.json" in the working directory instead of searching it in the application root directory.
Is it a behavior that you can fix?
The $NODE_CONFIG_DIR environment variable is there to help. Normally node-config looks into the ./config directory of the running application. In cases where you need more control, it first checks the $NODE_CONFIG_DIR environment variable. Just set it before running your app, and you should be good.
Hi,
I've a problem with the uptime app, related to the config module.
I'd like to run uptime as a service on my Ubuntu 12.04 server, but my problem is that I can't launch the app from anywhere on my server. It seems that I need to be in the uptime directory, otherwise I get this error:
It searches "config/runtime.json" in the working directory instead of searching it in the application root directory.
Is it a behavior that you can fix?
Thanks.
PS: the issue on uptime's repo fzaninotto/uptime#123
The text was updated successfully, but these errors were encountered: