Closed Karman40 closed 3 years ago
Duplicate of #5686 and #5667
Duplicate of #5686 and #5667
I do not agree. The hot-reload theme is common, but the error is not the same ... and both are closed while an open bug, I don't see a solution in any of the posts. If it worked for me, it would be good with webpack@4 as well.
If you don't think it's the same, can you provide minimum reproduction?
Best regards, Jay McDoniel
On Mon, Nov 16, 2020, 5:47 PM Kármán Zsombor notifications@github.com wrote:
Duplicate of #5686 https://github.com/nestjs/nest/issues/5686 and #5667 https://github.com/nestjs/nest/issues/5667
I do not agree. The hot-reload theme is common, but the error is not the same ...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nestjs/nest/issues/5706#issuecomment-728632650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXVRCD3P3VHQYGKH4IDCRLSQHI4LANCNFSM4TX5WMVQ .
If you don't think it's the same, can you provide minimum reproduction? Best regards, Jay McDoniel … On Mon, Nov 16, 2020, 5:47 PM Kármán Zsombor @.***> wrote: Duplicate of #5686 <#5686> and #5667 <#5667> I do not agree. The hot-reload theme is common, but the error is not the same ... — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5706 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXVRCD3P3VHQYGKH4IDCRLSQHI4LANCNFSM4TX5WMVQ .
Here is my source code: https://github.com/Karman40/nestjs-hot-relod-bug
This is still related to the fact that @nestjs/cli^7.5.2
has webpack^5
as a dependency. If you install @nestjs/cli@7.5.1
the command works as expected. I wonder how feasible it would be to make typescript
and webpack
peerDependencies
and what implications that would have.
start-server-webpack-plugin
is incompatible with Webpack 5. Let's track this here https://github.com/ericclemmons/start-server-webpack-plugin/issues/40
That's fine. What made me think differently was that with a project I created a couple of weeks ago, everything went fine with these settings. packege.json was the same, but then it happened that there was a new release and in that project it didn't happen npm i.
Only nestjs 7.5> uses with webpack 5. @Karman40 use "start-server-nestjs-webpack-plugin" in place of "start-server-webpack-plugin". https://github.com/nestjs/docs.nestjs.com/pull/1545
start-server-nestjs-webpack-plugin
Thanks, I added, but I still have to use @ nestjs / cli "7.5.1" with webpack@4. Why is this better than that?
for what its worth the documentation should be updated to match (and is not working for me just flipping to use start-server-nestjs-webpack-plugin
)
https://docs.nestjs.com/recipes/hot-reload
```bash
Info Webpack is building your sources...
api |
api | (node:18) [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.
api | (Use `node --trace-deprecation ...` to show where the warning was created)
api | (node:18) UnhandledPromiseRejectionWarning: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
api | at Function.from (
@Karman40 I had similar issue running start:dev. Installing @nestjs/cli
dependency for my repo locally fixed it: yarn add -D @nestjs/cli@7.5.1
.
@l3v1k Yes thanks for saying it before. In my writing above, I was puzzled as to what is better than a "start-server-webpack-plugin" because it doesn't work for me either? only 7.5.1 and webpack @ 4
Bug Report
nest build --webpack --webpackPath webpack-hmr.config.js
this is fresh, starter projekt, only test hot reload, but not working
Environment