Nodemon not restarting after file changes : [nodemon] restarting due to changes error

Viewed 16

Whenever I make a change to a file and save it as it should, Nodemon restarts but never gives me an output, instead of restarting for a long time.

Here is the result I get

Here is my package.json file

      {
  "name": "Backend",
  "version": "1.0.0",
  "description": "",
  "main": "Index.js",
  "type": "module",
  "scripts": {
    "start": "nodemon index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.1",
    "cors": "^2.8.5",
    "express": "^4.17.2",
    "mongoose": "^6.1.6"
  }
}

I've been looking for a solution to this on stackoverflow and tried a few things, but I'm not sure why the results aren't working.

I tried installing it globally with npm install -g nodemon, but it still does not restart, instead displaying the same restarting message for a long time.

npm install nodemon@2.0.2 -g

And I've tried adding the system path as suggested in a previous answer to this question, but it's still not working.

0 Answers
Related