简体   繁体   English

如何解决 WebStorm 调试器中的请求 error.net::ERR_NAME_NOT_RESOLVED?

[英]How to solve request error net::ERR_NAME_NOT_RESOLVED in WebStorm debugger?

I have created JavaScript debugger in WebStorm 2022.1 and backend requests fail during debugger running.我在 WebStorm 2022.1 中创建了 JavaScript 调试器,但在调试器运行期间后端请求失败。 Debugger URL is written as http://localhost:3000 and Angular CLI is running also on http://localhost:3000 .调试器 URL 写为http://localhost:3000和 Angular CLI 也在http://localhost:3000上运行。 Do I need to add some additional configuration for requests?我是否需要为请求添加一些额外的配置?

GET http://backendURL/rights net::ERR_NAME_NOT_RESOLVED

The JavaScript debugger in Webstorm and the Angular CLI are conflicting on the same port(3000). Webstorm 中的 JavaScript 调试器和 Angular CLI 在同一端口 (3000) 上发生冲突。 You can change the port that the JavaScript debugger is running on by going to the "Run" menu in Webstorm and selecting "Edit Configurations" and change the "Debug port" to a different port(eg 3001) and re-run the debugger or you can change the port of Angular CLI by running ng serve --port=YOUR_PORT_NUMBER .您可以更改运行 JavaScript 调试器的端口,方法是转到 Webstorm 中的“运行”菜单并选择“编辑配置”并将“调试端口”更改为不同的端口(例如 3001),然后重新运行调试器或您可以通过运行ng serve --port=YOUR_PORT_NUMBER更改 Angular CLI 的端口。 Also, make sure that the backend URL is correct and that the server is running and accessible.另外,请确保后端 URL 正确并且服务器正在运行且可访问。 If the issue persists, check the.network settings and make sure that there are no firewalls or other security measures blocking the connection.如果问题仍然存在,请检查网络设置并确保没有防火墙或其他安全措施阻止连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM