nodemon: nodemon doesn't check nodemon.json in CWD

Hi! I have the following nodemon.json:

{
  "ignore": [
    "\\.git",
    "node_modules/*",
    "public/*",
    "npm-debug.log",
    "node_modules/.*.*/node_modules"
  ],
  "verbose": true,
  "watch": [
    "app/shared/",
    "config/"
  ]
}

and then when I change config/default.json:

30 Dec 17:05:34 - [nodemon] files trigggering change check: /Users/max/Projects/maxdegterev/config/default.json
30 Dec 17:05:34 - [nodemon] changes after filters (pre/ignored/valid): 1/1/0

So clearly it doesn’t read the configuration file 😦

Also saw this:

30 Dec 17:00:00 - [nodemon] v1.0.1
TypeError: Cannot read property 'update' of null
    at Object.Configstore.get (/usr/local/lib/node_modules/nodemon/node_modules/update-notifier/node_modules/configstore/configstore.js:83:17)
    at UpdateNotifier.check (/usr/local/lib/node_modules/nodemon/node_modules/update-notifier/lib/update-notifier.js:51:28)
    at module.exports (/usr/local/lib/node_modules/nodemon/node_modules/update-notifier/lib/update-notifier.js:142:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/nodemon/bin/nodemon.js:7:16)
    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)

If appropriate, please file an error: http://github.com/remy/nodemon/issues/new

30 Dec 17:00:00 - [nodemon] to restart at any time, enter `rs`
30 Dec 17:00:00 - [nodemon] watching: /Users/max/Projects/maxdegterev

And you have a typo in “triggering”: trigggering

Also I’m not entirely sure but it looks like nodemon creates a stdout file in CWD ❓ ❓ ❓

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 19 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Wow! Thanks @remy! images

  1. There might be an implied behaviour that you’re expecting: if you’re watching a directory, you’re asking nodemon to watch all extensions? This isn’t the case right now (it’s currently looking for a single ext - if you copy and paste the nodemon -V output then I can see what exactly).
  2. Looks like a bug in https://github.com/yeoman/update-notifier which is a pain - I’ll wrap that in a try/catch in the mean time and file an issue (though I’m not sure how to replicate).
  3. Typo - cheers, will fixed.
  4. “not entirely” - does that mean there’s a file in your cwd or not? If there is, can you show me what it is? nodemon should not be creating an files except during startup in the /tmp directory and it gets immediately removed…

Note that point (1) can be immediately remedied by adding the ext property to your config:

{
  "ext": "js,json",
  "ignore": [
    "\\.git",
    "node_modules/*",
    "public/*",
    "npm-debug.log",
    "node_modules/.*.*/node_modules"
  ],
  "verbose": true,
  "watch": [
    "app/shared/",
    "config/"
  ]
}