Closed CodingMeSwiftly closed 3 years ago
We got the same issue, and we can confirm it works with 8.0.2
Same Node Version, different OS (Windows 10 and some Linux)
@kamilmysliwiec @CodingMeSwiftly More on this here https://github.com/webpack/webpack/issues/13876 .Downgrading webpack to 5.45 should make hmr usable in nest for the time being.
Downgraded to 5.45 for the time being https://github.com/nestjs/nest-cli/commit/73250b66103fa50935291e35e8a765e767fdcf36 (make sure to update @nestjs/cli
to the latest version)
It's fixed in webpack 5.48.0
https://github.com/webpack/webpack/releases/tag/v5.48.0
@krnlde thanks for the heads-up. We'll upgrade to the latest version very shortly, in the next patch release
Bug Report
When following the instructions in the docs on how to add hot reload functionality to a project with cli (first paragraph), we end up with an infinite loop when running the dev script.
Current behavior
npm run dev script from docs will result in a successful build, but webpack hmr will log "[HMR] Nothing hot updated." indefinitely to the console.
Expected behavior
HMR should work with the latest versions of @nestjs/cli.
Possible Solution
I've narrowed the issue down to the installed version of @nestjs/cli. Explicitly installing 8.0.2 will work as intended.
The webpack sample works out of the box, because it has 8.0.2 of cli installed (note: not ^8.0.2).
Since npm i @nestjs/cli will install ^8.1.0 by default, new projects following the docs will most likely all run into this issue.
Environment