nx: Serve command doesn't detect nodeJS app process exiting
Current Behavior
Serve a nodeJS program that does process.exit(1).
It does not output anything and the user has to rely on other observations to deduce that their code exited. In fact editing the code still creates normal webpack output as if the process was reloaded, but the process is dead and is never restarted. The developer has to kill the serve command manually and restart it manually to restore the nodeJS app’s process.
Expected Behavior
The serve command should output a message saying that my code exited, and what the exit code was. Editing any code should start the process back up [if it was dead]. I expect making an edit to the code and webpack “reloading” to restart a dead nodeJS program automatically.
Steps to Reproduce
Create a node app that does this
process.exit(1)
Environment
Mac OS
This is also a duplicate of https://github.com/nrwl/nx/issues/4054 it appears that issue was closed despite the linked fix being totally tangential to the root issue
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 18 (1 by maintainers)
This is fixed here https://github.com/nrwl/nx/pull/22705
First reported in 2020 (https://github.com/nrwl/nx/issues/4054) then again mid 2021 (https://github.com/nrwl/nx/discussions/5726) and still no fix on the horizon?