I have installed nodemon using command:
npm install nodemon -g
Having done that I changed "start": "node ./bin/www"
to "start": "nodemon ./bin/www"
Output in Console on running npm start
:
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www ./bin/www`
and so on....
Where am I going wrong? Please bear in mind that this is my 3rd day on nodejs so keep it simple.
Edit
"scripts": {
"start": "nodemon app.js"
},
"nodemon app.js" seems to work since the console does not show any errors but then I am unable to run the application. However if I change it back to node ./bin/www
it would work.
Try to downgrade requirements. This helped me.
npm install [email protected] -g
I reproduced this issue in docker image (node:alpine) with nodemon >1.2.0 100%. And v1.1.0 and v1.2.0 have some strange issues too.
I checked only minor releases (w/o checking patchlevels e.g. 1.2.1, 1.2.2 and others)
So. 1.0.0 is old, but works well.
On my host Mac I have [email protected] installed globally. Sometimes I have this issue and sometimes I don't. This is somehow connected with pwd and nodemon.json file. But I'm not sure.
I found a bug report related to this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With