nodemon isn’t working [solution]

Abdur Rakib
2 min readMar 23, 2019

--

found this photo interesting as last night I was so much tensed about why the heck my nodemon isn’t working! Photo by Wes Hicks on Unsplash

hi,

recently I’ve started learning node.js, the lovely JavaScript framework for doing backend development, I’m also learning about express.js, another great framework for JavaScript for structuring a web application to handle multiple different HTTP requests at a specific URL.

But it’s very irritating to restart the server whenever I change something in my code. Then I got to know about nodemon, a node package for monitoring my code, if I change anything in my code then it automatically restarts the server, then I installed it globally by using the following command.

npm i -g nodemon

I saw several tutorials on how it works, followed the same method. I ran the command as “node app.js(my main file)”. It’s not restarting the server, tried by adding the manual setting for nodemon in the vs code setting json file, it’s still not working, I went through some of the StackOverflow questions. But it doesn’t work for me. I became so upset then stopped coding after trying like 5- hours approximately.

my node version: v10.15.1 & nodemon: 1.18.10

Then the next day out of curiosity I ran the command “npm start” as the tradition of running any node project. Then finally it started working!!!

So if you install nodemon, then if it doesn’t work then run the project using “npm start”. But if you get any error like the below →

error

then please add this script “start”: “nodemon” in your package.json file →

Thanks, as today is my weekend, no office, slept the whole day then thought to share this experience to all of you who read this post.

my personal website: arafatrakib.com

--

--

Abdur Rakib

Software Project Manager @brainstation23 | 2nd largest software company in Bangladesh.