I\'m on a Mac running El Capitan. I have node v5.6.0 and npm v3.6.0. When I try to run nodemon, I get:
-bash: nodemon: command not found
I th
npm install nodemon --save-dev
Next package.json on and
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon app.js"
}
Type on terminal (command prompt)
npm start
In macOS, I fixed this error by installing nodemon globally
npm install -g nodemon --save-dev
and by adding the npm path to the bash_profile file. First, open bash_profile in nano by using the following command,
nano ~/.bash_profile
Second, add the following two lines to the bash_profile file (I use comments "##" which makes it bash_profile more readable)
## npm
export PATH=$PATH:~/npm
For nodemon: not found command I tried with many links but was not working then i tried with the below steps it worked fine.
Follow this step it worked for me.
step1 : sudo su
step2 : npm install -g nodemon --save-dev
It is working fine.
in Windows OS run:
npx nodemon server.js
or add in package.json config:
...
"scripts": {
"dev": "npx nodemon server.js"
},
...
then run:
npm run dev
I had the same exact problem, expect for Windows OS.
For me, running
npm install -g nodemon --save-dev
(note the -g) worked.
Maybe somebody else who has this problem on Windows will have the same solution.
I tried the following, and none worked:
npm uninstall nodemon
sudo npm uninstall -g nodemon
What did work was:
sudo npm install -g --force nodemon