One, foreword

When we use vue to develop projects, the browser often gives an error: sockjs.js? 9 be2:1606 GET http://192.168.1…. Although it will not have any impact on the project, I am obsessive-compulsive and can’t stand seeing mistakes. Today I will teach you how to solve this mistake. Sockjs-node is a JavaScript library that provides cross-browser JavaScript apis and creates a low-latency, full-duplex communication channel between the browser and the Web server. Network calls this interface all the time after the project runs. If not, the exception is always reported.

Second, solutions

Find the cause of the error is easy to do, the following is the solution.

Step 1: Find /node_modules/sockjs-client/dist/sockjs.js

Step 2: On line 1606, comment out self.xhr.send(payload); This row, and then we can solve it

Third, the end

More wonderful articles welcome to visit personal station: WJhsmart. VIP/Everyone is welcome to step on each other.

If you found this article helpful, give the blogger a thumbs up.

\