Screenshot form VS code terminalnodemon : 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.
-
1Try installing nodemon globally. Npm install nodemon-g – EAzevedo Oct 10 '21 at 10:08
-
Does this answer your question? [nodemon not working: -bash: nodemon: command not found](https://stackoverflow.com/questions/35530930/nodemon-not-working-bash-nodemon-command-not-found) – Black Mamba Oct 11 '21 at 08:09
4 Answers
I just meet that question.
First, you should make sure that you had installed nodemon in a global way (npm install -g nodemon
), and make sure global package dir is in the environment variables.
Secondly, you should RESTART VScode if you are opening it now. I spent lots of time to make sure the previous one, but it still fails, then when I restart VScode, everything is fine!
Try to install nodemon
globally:
https://github.com/remy/nodemon
npm install -g nodemon
and edit Your package.json
for example like that:
"scripts": {
"start": "node server",
"dev": "nodemon server"
},
then in terminal enter the command =>
npm run dev
It should works for You now ;-) Good Luck and Best regards !

- 5,122
- 4
- 13
- 29
-
It should be noted that this should work _without_ needing to install nodemon globally, assuming that nodemon is installed in the package itself. – Jhecht Oct 10 '21 at 10:23
Below are some solutions
- This is how you can install nodemon
npm install -g nodemon
after that you have to run this command: npm run dev
here dev is (script) server name like
{
"main": "app.js",
"scripts": {
"dev": "nodemon app.js"
},
}
- after that if you are facing error like " 'nodemon' is not recognized as an internal or external command, operable program or batch file. " Then after install nodemon globally write below command:
npm config get prefix
in output you will get PATH and then past this path in to the Environment Variables and it solved
Restart the terminal and run this command
nodemon run dev
I hope after that it will work properly :)

- 11
- 2