I am using the nodemon package, but it is not restarting the server. It is only showing "restarting due to changes". But in youtube videos, I saw that it was showing "server running" status after that.
In my case, that was not showing. It simply shows "restarting due to changes", my work also does not update when I view it in a browser.
I read lots of related stack overflow questions but none of them helped me ... Installing them locally on my project as devdependent.noting also does not work.
I also tried changing the script tags in the package.json file.
While running, I used nodemon, npm start, nodemon app.js, nodemon lib/dev-server.js --delay 1, nodemon -L, and many more, but nothing helped.
================================================================================= edited question:
i am using vs code. trying to run my javascript code with express framework .
i am using git bash terminal. whatever basic hello world code also cannot run with nodemon.
the steps i have followed:
node -v and npm -v is working on my bash terminal.
i have created a basic hello world express app . using npm init npm install express --save
i am attaching my github repository of this testApp https://github.com/webdevshiv/testApp.git
then the main problem is about nodemon..
installing nodemon: npm install nodemon --save-dev,also nodemon install -g
in script tag : "scripts": { "start": "node app.js" },
code for running nodemon: nodemon app.js
in my terminal while running this i am getting:
(bash: nodemon: command not found)
but node app.js is working....
then using npx nodemon app.js it was showing-----
([nodemon] 2.0.4 [nodemon] to restart at any time, enterrs[nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,json [nodemon] startingnode app.js Example app listening at http://localhost:3000 [nodemon] restarting due to changes... [nodemon] restarting due to changes... [nodemon] restarting due to changes... [nodemon] restarting due to changes.)
you can clearly see on first time it was listening to port but on next times when i do any changes it showing restarting. but not restarting..
before when i am posting this this was the case for using nodemon normally but now nodemon is not working ...
i am attaching my system environment variable path: C:\Program Files\MongoDB\Server\4.2\bin;C:\Program Files\Git\cmd; C:\Program Files\nodejs; C:\Program Files\nodejs\node_modules\npm
i am giving link for my vs code screenshots https://imgur.com/e6ViUaF https://imgur.com/eWOkG0V