-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Hot reload does not work properly #14838
Comments
It was working before and now I have exactly the same issue :( |
Same problem here as well |
I didn't manage to spot the broken version. Both nestjs cli v10 and v11 behaves the same (the HRM seems not to be working). @lioncedric @kacime @coderlzw-cn can't you revert your code (including the lock file of |
Downgrading "run-script-webpack-plugin" to "0.2.1" fixes the issue. Process is Another solution using autoRestart: true, // previous: false - Not quite the same but Another solution using // Moving app.close from module.hot.dispose to, also leaving dispose with an async callback
process.on('SIGTERM', async () => {
if (app) {
await app.close();
}
}); |
Is this something we should report in the |
Thank you @sergiupris ! |
Is there an existing issue for this?
Current behavior
Kapture.2025-03-24.at.10.15.28.mp4
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-7hmvnlhs?file=src%2Fmain.ts
Steps to reproduce
https://docs.nestjs.com/recipes/hot-reload
Expected behavior
How should I implement hot reload and ensure that the service is accessible
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
11.0.1
Packages versions
Node.js version
v20.19.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: