-
-
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 crashes first restart then works ok the second one when started like nodemon --inspect=0.0.0.0:9229 app.js #1050
Comments
I ran into this issue as well when using nodemon with the inspect flag within a docker container. Oddly, it only seems to happen when I add heapdump to the project along with the requisite python dependency for node-gyp. If I remove heapdump, it works as expected. Perhaps this is related to using a native module somehow? |
This has been an issue for me also. Ideally there'd be a flag specifying a delay between shutdown and startup so that the tcp port has enough time to close. |
Just kill inspector and start inspector again
|
@yujiahaol68 good workaround, just used it, thanks ! |
@yujiahaol68 What is the kill-port command? I don't have this one |
That is a npm package. A command line tool. @Dim73 |
Closing with the work around mentioned earlier. |
As mentionned here, instead of the |
If there is no reason to update nodemon, previous version 1.17.4 seems to work trouble free. |
Hey everyone, updating nodemon from version 1.18.6 to 1.18.9 fixed the issue for me. |
Works with fuser command even in alpine images without requiring the kill-port package:
Credit to @abou7mied: #1346 (comment) |
MacOS equivalent for
|
Adding |
I don't understand how this got closed. This is a pretty common setup and the workaround is hacky. |
I just ran into this and I very much agree with @kasvtv, it seems very strange to just close the issue. Running dev environments in docker containers seems pretty common these days? |
Nowaday it's super common to have nodemon running on docker containers, so I think this ticket should be reopened. I don't know how nodemon works internally but I think having an internal flag that indicates to process to close the port and then watch files again could be a simple workaround. |
Short reply - I don't use docker (not once for any client project or side project), so please send PR to fix with tests that show the fix works. Happy to merge. Otherwise, this issue is closed because there's a solution (pending your PRs). Sorry (docker) folks, just saying 'I think this is strange' doesn't solve the core issue. Ta. |
inside a container based on
with a shared volume on sources. Whenever I save a file on the sources volume, nodemon restarts but crashes with
Re-saving the same file, again restarts but works ok this time.
The text was updated successfully, but these errors were encountered: