question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server still running after stopping Nodemon

See original GitHub issue
  • nodemon -v: 2.0.7
  • node -v: 14.17.0
  • Operating system/terminal environment: WSL2 Ubuntu 20.04

Expected behaviour

The server stops after using ctrl + c, and not run in background

Actual behaviour

The server doesn’t stops after ctrl + c and it keeps runs in background even after uninstalling

Steps to reproduce

I started the server using nodemon and my script was "server": "npx nodemon app.js" and ran npm server start But server is still running in the Browser, I can’t start any other server on that same port i.e 3000 app.js is a simple express app

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
GalaxySHcommented, Jul 11, 2021

Well, it’s not

0reactions
mlarabicommented, Jul 12, 2021

After further tests using the repo above it seems that nodemon works just fine. Using nodemon index.js the server does restart as expected. So the issue is more on npm-watch, for me at least.

https://user-images.githubusercontent.com/75162562/125225811-2b274180-e2d0-11eb-9987-bc6c23e9cda8.mp4

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Can't stop server running by nodemon - Stack Overflow
I add nodemon for automatically run server then run test. But have error when run gulp task again. I have error that the...
Read more >
Automatically restart Node.js apps with Nodemon
The essential tutorial for Nodemon, a utility for Node.js applications that monitors for changes and automatically restarts the server.
Read more >
nodemon events — run tasks at server start, restart, crash, exit
Because nodemon doesn't run npm start-dev when it restarts the server, the pre command isn't run either. So this works only the first...
Read more >
How to kill server when seeing “EADDRINUSE: address ...
A tutorial on how to kill the process manually when “EADDRINUSE” happens on Mac/Linux and Windows. Nodejs listen EADDRINUSE: address already in ...
Read more >
nodemon - npm
Whilst nodemon is running, if you need to manually restart your application, instead of stopping and restart nodemon, you can type rs with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found