Categories
JavaScript Answers

How to fix nodemon command is not recognized in terminal for Node.js server?

Spread the love

To fix nodemon command is not recognized in terminal for Node.js server, we put nodemon in a script in package.json.

For instance, in package.json, we write something like

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

to run server.js with nodemon.

Then we run

npm run server

to run the script.

We install nodemon with

npm i nodemon

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *