Cadell Teng
Cadell Teng

Reputation: 244

Nodemon is not running

I am trying to get my nodemon to start running. But somehow it doesn't run and it have no error message and it's pretty frustrating.

Please see my package.json below:

{
  "name": "umbrella_maintenance",
  "version": "1.0.0",
  "description": "",
  "main": "app-express.js",
  "scripts": {
    "start": "nodemon"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ejs": "^3.1.5",
    "express": "^4.17.1"
  },
  "devDependencies": {
    "nodemon": "^2.0.6"
  }
}

I tried running npm run start but it simply do not work. No error message no nothing. Screenshot of terminal

My app runs fine when I try to start with node app-express.js, but doesn't work when it's nodemon. Any advice?

Upvotes: 0

Views: 7107

Answers (2)

jacobkim
jacobkim

Reputation: 1090

nodemon help web server shows status. When an error occurs or web server runs well then nodemone shows logs on console. But nodemon can't run web server if the exact path isn't put on command. So nodemon helps node running web server which is executed by node path/yourApp.js.

To execute nodemon, type nodemon path/yourApp.js.

Upvotes: 1

Cully
Cully

Reputation: 6955

The documentation says that you need to run nodemon like this nodemon [your node app]. So in your case: nodemon app-express.js. There are a variety of other useful options for nodemon. It's worth reading the documentation.

Upvotes: 2

Related Questions