Thursday, December 8, 2022

angular: [webpack-dev-server] Disconnected! polyfills.js:1 [webpack-dev-server] Trying to reconnect...

  

>PROBLEM


When you access the Angular app, the browser's console returns the following message, that keeps repeating:

[webpack-dev-server] Disconnected!
polyfills.js:1 [webpack-dev-server] Trying to reconnect...


>SOLUTION


When starting the Angular app using the "--host" flag, it may also require the "--disable-host-check" flag.

It usually happens when using docker, and it is required the "--host" flag to enable access to the app.


Notice that, when you start the service using just the "host" flag, you get this advice:


  Warning: This is a simple server for use in testing or debugging Angular applications

  locally. It hasn't been reviewed for security issues.

  Binding this server to an open connection can result in compromising your application or

  computer. Using a different host than the one passed to the "--host" flag might result in

  websocket connection issues. You might need to use "--disable-host-check" if that's the

  case.

  


>ENV

Angular CLI: 14.2.9

Node: 16.13.1

Package Manager: npm 8.5.4

OS: win32 x64

debian/docker




[MYREF]:
y;faq-angular [webpack-dev-server] Disconnected! polyfills.js:1 [webpack-dev-server] Trying to reconnect...<memo<angularx;.

No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...