Anis
Anis

Reputation: 1219

Nodemon is not recognized as an internal command operable program or batch file

I was working with NodeJS, but due to some other issue I installed Windows again. Now I have installed nodemon gloabally and it also show version in C drive, but when I try to run project it gives me the error:

nodemon is not recognized as an internal command operable program or batch file

Upvotes: 0

Views: 23808

Answers (7)

chayan majumdar
chayan majumdar

Reputation: 21

You write install instead of init Run npm install nodemon

Upvotes: 0

Fredio Pratama D
Fredio Pratama D

Reputation: 1

In My Windows this is Work :

  1. npm install -g nodemon
  2. Open your folder that you want to run nodemon, ex in my picture: https://i.sstatic.net/fUTnV.jpg
  3. in Terminal write : Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  4. in Terminal write : nodemon

Upvotes: 0

jayesh
jayesh

Reputation: 19

  1. first try this: npm install -g nodemon if this not work in case of mine
  2. try yarn add nodemon it will work

Upvotes: -3

Jeet Jain
Jeet Jain

Reputation: 21

I installed it as "npm install -g nodemon". That worked for me.

Upvotes: 2

Anurag Chugh
Anurag Chugh

Reputation: 609

  1. Run: $ npm install -g nodemon

  2. Run: $ npm install --save-dev nodemon

  3. Change package.json file as:

"scripts": {
    "serve": "nodemon index.js"
}
  1. Run: $ npm run serve

Upvotes: 6

Anis
Anis

Reputation: 1219

it was Loading error and was completely loaded after i restart System so that works

Upvotes: 0

Paul
Paul

Reputation: 31

Make sure that you have nodemon dependency in package.json file in your current project. If you don't see it listed in this file run npm i nodemon --save

Once checked, you might execute nodemon by:

  • running script nodemon index.js (or whatever name your js file has)
  • running command npm run start (though you have to update scripts in your package.json file with new script "start": "nodemon index.js")
  • running command nodemon, but in this case you have to have index.js file in your current project as well, as by default nodemon will try to find and execute index.js file.

Upvotes: 3

Related Questions