Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The nodemon is not being recognized by the terminal

I'm following this youtube tutorial on MERN.

Video link:

https://www.youtube.com/watch?v=xKs2IZZya7c&ab_channel=CodingWithDawid

Application github link:

https://github.com/dejwid/mern-blog

At minute 45:00 of the video, he mentions installing nodemon without go into too much detail. I installed this but nodemon is not working. When I type at the command prompt:

nodemon index.js

There, an error message appears:

nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name or, if a path was included, verify that the path is correct and try again. On line:1 character:1 + nodemon index.js + ~~~~~~~ + CategoryInfo : ObjectNotFound: (nodemon:String) [], CommandNotFoundEx conception + FullyQualifiedErrorId : CommandNotFoundException

nodemon is installed globally, as you can see in my package.json

package.json:

{
   "dependencies": {
     "express": "^4.18.2",
     "g": "^2.0.1",
     "react-router-dom": "^6.10.0"
   },
   "devDependencies": {
     "nodemon": "^2.0.22"
   }
}
like image 317
claudiopb Avatar asked Dec 31 '25 19:12

claudiopb


1 Answers

the solution is to run as:

npx nodemon index.js

or to install nodemon globally so it's available as a cli command:

npm install -g nodemon

ref: https://www.npmjs.com/package/nodemon & https://nodemon.io/

like image 110
Ron Avatar answered Jan 03 '26 11:01

Ron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!