Skip to content
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 won't restart webpack-serve #1409

Closed
aaronjensen opened this issue Aug 23, 2018 · 12 comments
Closed

nodemon won't restart webpack-serve #1409

aaronjensen opened this issue Aug 23, 2018 · 12 comments

Comments

@aaronjensen
Copy link
Contributor

  • nodemon -v: 1.18.3
  • node -v: v8.10.0
  • Operating system/terminal environment: macOS 10.13.6
  • Command you ran:
nodemon --signal SIGINT --watch webpack.config.js --exec webpack-serve

Expected behaviour

When webpack.config.js changes, I'd expect it to restart webpack-serve

Actual behaviour

It detects a "clean exit" and does not restart:

│ℹ 「hot」: webpack: Compiling...                                                                                                     │
│ℹ 「serve」: Project is running at https://localhost:8000                                                                            │
│ℹ 「serve」: Server URI copied to clipboard                                                                                          │
│No type errors found                                                                                                               │
│Version: typescript 3.0.1                                                                                                          │
│Time: 14095ms                                                                                                                      │
│ℹ 「hot」: webpack: Compiling Done                                                                                                   │
│ℹ 「wdm」:                                                                                                                           │
│ℹ 「wdm」: Compiled successfully.                                                                                                    │
│[nodemon] restarting due to changes...                                                                                             │
│ℹ 「serve」: Process Ended via SIGINT                                                                                                │
│[nodemon] clean exit - waiting for changes before restart                                                                          │

Steps to reproduce

git clone git@github.com:aaronjensen/nodemon-repro.git
cd nodemon-repro
yarn
yarn start

Then make a change to webpack.config.js

Of note is that I had to add --signal SIGINT because I typically run nodemon inside of stmux. If it's running inside of stmux, it does not properly die when stmux is killed. This may be another bug, though I don't know where the bug may be.

To reproduce that, run yarn start:stmux and then hit Ctrl-a k

Perhaps I'm doing something entirely wrong here, but I couldn't find any other examples or docs. Any pointers would be appreciated, thanks!

@stale
Copy link

stale bot commented Sep 7, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Sep 7, 2018
@aaronjensen
Copy link
Contributor Author

This is still a problem AFAIK.

@stale stale bot removed the stale no activity for 2 weeks label Sep 7, 2018
@stale
Copy link

stale bot commented Sep 21, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Sep 21, 2018
@aaronjensen
Copy link
Contributor Author

Still a problem. I looked at the code briefly and it seems like there may be a logic error, I'll submit a PR for feedback.

@stale
Copy link

stale bot commented Oct 5, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Oct 5, 2018
@aaronjensen
Copy link
Contributor Author

this is a fun dance mr. stale bot.

PR is here: #1430

@stale stale bot removed the stale no activity for 2 weeks label Oct 5, 2018
@stale
Copy link

stale bot commented Oct 19, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Oct 19, 2018
@aaronjensen
Copy link
Contributor Author

💃

@stale stale bot removed the stale no activity for 2 weeks label Oct 19, 2018
@stale
Copy link

stale bot commented Nov 2, 2018

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Nov 2, 2018
@aaronjensen
Copy link
Contributor Author

😿

@stale stale bot removed the stale no activity for 2 weeks label Nov 2, 2018
aaronjensen added a commit to aaronjensen/nodemon that referenced this issue Nov 2, 2018
aaronjensen added a commit to aaronjensen/nodemon that referenced this issue Nov 2, 2018
When nodemon kills the child app in preparation for a restart, the app may exit
with a non-zero status code, especially when using custom signals like SIGINT.
Previously, this would be detected as a clean exit rather than a restart, at
least on macOS.

There was an existing flag, `killedAfterChange` which causes the desired
behavior, but it was only set on Windows. It seems that setting it always leaked
between tests and caused problems, so we only set it if a restart is expected.

Fixes remy#1409
@remy
Copy link
Owner

remy commented Nov 5, 2018

I wish the damn stalebot wouldn't come back after it's been told to effoff! Or at least wait exponentially longer!

@aaronjensen
Copy link
Contributor Author

Aye, agreed. Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants