Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Disable file watching on Windows #17

wants to merge 3 commits into from

3 participants


I played with the API, but it is pretty awful right now. If the file doesn't exist, then you need to watch the directory for renames, then watch the file if it exists. This small change at least allows for devs to use node-config on Windows rather than erroring out.


Thanks for the pull request, Jon. I ran into this issue a couple months ago, and think it's a matter of using the new file watching API when we're running in node > 0.6. I'd rather put that into place vs. disabling file watching on windows. For node-config, we're not watching for new files - just changes on existing files.

Give me a day or two, and if I can't get it running well on windows I'll merge in your pull request.


0.4.12 was just published to npm with updated file watching. If the new style is available (0.6.0 and above), otherwise it fails back to the older style fs.watchFile functionality.

@lorenwest lorenwest closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 6, 2012
  1. @timoxley
  2. Merge pull request #16 from timoxley/patch-1

    Take people to latest docs straight away
Commits on Apr 25, 2012
  1. @jbuck

    Disable file watching on Windows

    jbuck authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +6 −1 lib/config.js
  2. +1 −1  package.json
7 lib/config.js
@@ -1022,5 +1022,10 @@ global.NODE_CONFIG = global.NODE_CONFIG ? global.NODE_CONFIG : new Config();
// aren't a part of the object namespace when inspected.
module.exports = global.NODE_CONFIG;
-// Watch for configuration file changes
+// Watch for configuration file changes, unless we're on Windows
+if (process.platform == 'win32') {
+ console.warn("node-config: Configuration file monitoring is disabled on Windows");
+ return;
2  package.json
@@ -4,7 +4,7 @@
"main": "./lib/config.js",
"description": "Configuration control for production node deployments",
"author": "Loren West <>",
- "homepage": "",
+ "homepage": "",
"directories": {"lib": "./lib", "config": "./config", "test": "./test"},
"dependencies": {
"yaml" : "0.2.x",
Something went wrong with that request. Please try again.