About sockjs.js?9be2:1606 GET http://****/sockjs-node/info?t=1581148413474 net::ERR_CONNECTI error solution

About sockjs.js?9be2:1606 GET http://192.168.1.1:8080/sockjs-node/info?t=1581148413474 net::ERR_CONNECTI error solution
Overview:
After creating the project, when running the project with npm run serve, After running, the console console always reports sockjs.js?9be2:1606 GET http://192.168.1.110:8080/sockjs-node/info?t=1581148413474 net::ERR_CONNECTI This error
analysis reason:
because of sockjs in node-modules There is a problem with -node, which is a JavaScript library that provides a cross-browser JavaScript API, creating a low-latency, full-duplex communication channel between the browser and the web server. After the project runs, the network will always call this interface. If it is not used, this exception will always be reported.
solution:

First find: /node_modules/sockjs-client/dist/sockjs.js 文件
Then open sockjs.js and scroll to line 1606, comment out: self.xhr.send(payload);just as
shown in the figure:
insert image description here

Solved it!

Guess you like

Origin blog.csdn.net/weixin_41262185/article/details/104224489