Nodemon cannot trigger restart

< H2 > modify the js file in the corresponding directory to trigger the script that restarts automatically < / H2 > < H2 > nodemon is configured as follows < / H2 >
{
  "restartable": "rs",
  "ignore": [
    ".git",
    "test/*",
    "node_modules/**/node_modules"
  ],
  "verbose": true,
  "execMap": {
    "js": "node ./bin parse-tsd -c tsd-config.json"
  },
  "events": {
    "restart": "osascript -e "display notification \"App restarted due to:\n"$FILENAME"\" with title \"nodemon\"""
  },
  "watch": [
    "model",
    "define",
    "service"
  ],
  "env": {
    "DEBUG": "parse-tsd"
  },
  "ext": "js"
}
< H2 > use this configuration, start for the first time, and output information < / H2 >

clipboard.png

Jun.06,2022

your own problem. The project directory itself is under node_modules, and nodemon ignores the changes under this directory by default. Rewrite the ignoreRoot configuration of nodemon, and solve the problem.

clipboard.png

Menu