nx: Nestjs app start does not use updated files after files changed
Current Behavior
So if i start the Nx project (my nestjs application) and i update something after Nx webpack reloads the app it does not start with the updated files, it comes outdated and this is very frustrating because we spin around thinking it is still bugged but it requires me to stop the nx start command and start it again otherwise it keeps looping with the previous version of the file. Also another thing that happens often is that the app when booting, it does twice which can introduce issues to me when doing tasks at modules bootstrap
Expected Behavior
When i change something i want webpack to reload but with the new files
Steps to Reproduce
Simply create a new Nestjs app using the official nx generator, change something (just create a console log will be sufficient) and see that if you change the message inside just for debugging purposes, it does not reload the app with the updated version, will always be the first that the webpack started off
Failure Logs
There are no errors associated
Environment
Node : 14.15.5 OS : darwin x64 pnpm : 5.17.3
nx : 11.2.12 @nrwl/angular : Not Found @nrwl/cli : 11.2.12 @nrwl/cypress : Not Found @nrwl/devkit : Not Found @nrwl/eslint-plugin-nx : 11.2.12 @nrwl/express : Not Found @nrwl/jest : 11.2.12 @nrwl/linter : 11.2.12 @nrwl/nest : 11.2.12 @nrwl/next : 11.3.0 @nrwl/node : 11.2.12 @nrwl/react : 11.3.0 @nrwl/schematics : Not Found @nrwl/tao : 11.2.12 @nrwl/web : Not Found @nrwl/workspace : 11.2.12 typescript : 4.0.7
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (2 by maintainers)
Same behaviour observed in our project. The hot reload seems to be properly triggered, but it uses the old files. For instance, if I add a
console.login a controller and save the file, it will reload, but the newly inserted log never gets printed. Stoping and restarting the app results in the log being properly printed.I’ve also noticed that Nx v12.10.0 with NestJS v8 doesn’t reload when a TypeScript interface file changes but it does reload when a class changes. So, errors in the interfaces don’t show up in the log. Is this expected because interfaces don’t exist at runtime?