Webpack服务器循环断开重新连接Angular 15

huangapple go评论58阅读模式
英文:

Webpack server loop disconnect reconnect angular 15

问题

我在本地主机上使用Angular 14/15中的Devpack服务器遇到了一个问题。刷新控制器中所做的更改会导致页面在刷新之前等待很长时间。在控制台中查看解释时,我发现服务器在建立连接之前尝试连接和断开连接多次。

我还在一个只有一个页面和一些图像的新项目中遇到了这个问题。没有逻辑、HTTP调用或其他可能干扰的东西。您认为这是由于什么引起的?感谢您的关注。

英文:

Hello i have an issue in localhost with Devpack server in Angular 14/15.
Refreshing changes made in a controller causes a long wait before refreshing the page. Checking the console for an explanation, I saw that the server tries to connect and disconnects multiple times before establishing the connection.

I also encountered this problem on a new project with only one page and some images. There is no logic, http call or anything else that could interfere. What do you think it is due to? Thank you for your attention

答案1

得分: 1

遇到了控制台不断抛出通知的问题。

[webpack-dev-server] 断开连接
[webpack-dev-server] 正在尝试重新连接...

不是专家,所以不确定这种问题实际上是在应用程序还是包的一侧,因为在我自己进行故障排除后,我找到的解决方法是:

将 'localhost' 添加到卡巴斯基安全浏览设置中的受信任网址
对于不同的防病毒软件,这应该在Web/网络保护设置周围。

英文:

Got the same problem of console throwing never-ending loop of notices.

> [webpack-dev-server] Disconnected<br>
> [webpack-dev-server] Trying to reconnect...

Not an expert, so I'm not sure if this kind of issue actually resides in the app or packages side because after I troubleshoot on my own, the solution I found was to:

Add 'localhost' to Trusted URLs in Kaspersky's Safe Browsing settings.<br>
For different antivirus, this should be around the web/network protection settings.

huangapple
  • 本文由 发表于 2023年6月15日 23:42:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76483362.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定