nodemon command is not recognized in terminal for node js server nodemon command is not recognized in terminal for node js server node.js node.js

nodemon command is not recognized in terminal for node js server


You need to install it globally

npm install -g nodemon# or if using yarnyarn global add nodemon

And then it will be available on the path (I see now that you have tried this and it didn't work, your path may be messed up)

If you want to use the locally installed version, rather than installing globally then you can create a script in your package.json

"scripts": {    "serve": "nodemon server.js"  },

and then use

npm run serve

optionally if using yarn

# without adding serve in package.jsonyarn run nodemon server.js# with serve script in package.jsonyarn run serve

npm will then look in your local node_modules folder before looking for the command in your global modules


  1. Install nodemon globally:

    C:\>npm install -g nodemon
  2. Get prefix:

    C:\>npm config get prefix

    You will get output like following in your console:

    C:\Users\Family\.node_modules_global

    Copy it.

  3. Set Path.
    Go to Advance System Settings → Environment Variable → Click New (Under User Variables) → Pop up form will be displayed → Pass the following values:

    variable name = path,variable value = Copy output from your console
  4. Now Run Nodemon:

    C:\>nodemon .


First, write npm install --save nodemonthen in package.json write the followings

"scripts": {    "server": "nodemon server.js"  },

then write

npm run server