You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI doesn't wait for the application to exit.
In the case of closing CLI with Ctrl-C, it results in the application still running (and logging messages) while control is returned to the terminal.
In the case of the watch command, the application is restarted before the previous instance is stopped, which results in address already in use error.
Is there an existing issue for this?
Current behavior
CLI doesn't wait for the application to exit.
In the case of closing CLI with Ctrl-C, it results in the application still running (and logging messages) while control is returned to the terminal.
In the case of the watch command, the application is restarted before the previous instance is stopped, which results in
address already in use
error.Minimum reproduction code
https://github.com/WiseBird/nestjs-shutdown
Steps to reproduce
From a code perspective, the app should have an async shutdown hook, e.g.:
The simplest steps:
npm start
could be also reproduced with
start:dev
command:npm run start:dev
Expected behavior
CLI waits for the application to exit before exiting itself or restarting the app.
Package version
8.2.5
NestJS version
8.4.4
Node.js version
16.10.
In which operating systems have you tested?
Other
The problem relates to #1487, not sure if it can be considered a duplicate as this one is not about http server but purely CLI issue.
The text was updated successfully, but these errors were encountered: