-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodemon - app crashes when restarting due to Node already running on that port #1464
Comments
I'm having the same issue. I'm finding it hard to find out the cause, because rolling back my shrinkwrap on the project seems to allow it to work, even though version numbers are mostly the same. The main diff I can see is inside Here are the diff packages: Non working:
Working:
|
Just want to follow up. If the ONLY thing I change in my shrinkwrap is the Looks like 1.1.1 and 1.1.2 were added in quick succession 4 days ago. If I force it to use 1.1.1 nodemon throws this error:
|
Found same solution... With "pstree.remy": "1.1.0" which use ps-tree library it is work fine. |
My solution:
in {
"events": {
"restart": "kill-port 5000",
"crash": "kill-port 5000"
},
"delay": "1500"
} Replace your port: "restart": "kill-port [my port]", |
@RoyalHunt be careful with rolling back @remy any idea what is causing this bug? Breaks my entire workflow that depends on nodemon restarts... edit: |
@murrayju Thanks for the heads up. Did the same, restricted ours to |
I need to know your OS… |
i have this problem with : |
@ravid87 do you have a pared down version of a script that I can replicate with? I'm using this in ubuntu (in docker) and I can't replicate either when it's a triggered restart or const express = require('express');
const app = express();
app.use((req, res, next) => {
res.send('<h1>Hello from Express!</h1>');
});
app.listen(3000) |
https://github.com/ravid87/testmon you just have to run : yarn run dev |
Track here #1463 (comment) |
I am still having this problem using Node v8.11.3, on MacOS 10.14.3. |
@aymather u need to kill the process work on the port for exemple 3000 and restart everything.Or u will take my idea, that mean u will change the port every time when u have the same problem. |
@arabrain When I tried restarting on different ports I still had the same issue. Right now my fix is to use the following command in the command line: |
do this in package.json |
This is happening again. I am wondering if the fix introduced https://github.com/remy/nodemon/commit/c05d2d1e3a1977692d36def8c5d64c73046965c1 has again been overrided wrongly |
for the moment similar to aymather , I am killing forcely all the process on that port with
|
@TCarmine if you're seeing a new issue you'll want to create a new issue (even though it has similar symptoms to this issue raised last year). You'll also need to make sure you're on the latest nodemon, currently 2.0.1 |
I'm going to lock this issue to encourage any new issues into new (and monitored) discussion 👍 |
nodemon -v
:1.18.6node -v
:8.10.0Expected behaviour
Nodemon closes the old Node process and creates a new one
Actual behaviour
Nodemon doesn't stop the old Node process and then the new one crashes because it's trying to run on the same port
Steps to reproduce
Run Nodemon and save the file after making changes
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: