net::ERR_CONNECTION_REFUSED sockjs

我开了个虚拟机写 vue,因为 nodejs 这东西就是个污染源,我不想污染我的 windows 10。结果控制台一片飘红:

sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258041405 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258046437 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258053980 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258063983 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258078979 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258100982 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._receiveInfo @ sockjs.js?9be2:787
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
eval @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1598
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRCorsObject @ sockjs.js?9be2:2872
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ client?e0b3:176
eval @ index.js?http://localhost:177
./node_modules/webpack-dev-server/client/index.js?http://localhost @ app.js:2928
__webpack_require__ @ app.js:727
fn @ app.js:101
1 @ app.js:3160
__webpack_require__ @ app.js:727
(anonymous) @ app.js:794
(anonymous) @ app.js:797
sockjs.js?9be2:1606 GET http://10.21.143.22:8080/sockjs-node/info?t=1570258119982 net::ERR_CONNECTION_REFUSED
AbstractXHRObject._start @ sockjs.js?9be2:1606
eval @ sockjs.js?9be2:1495
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1494
XHRLocalObject @ sockjs.js?9be2:2915
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:536
InfoReceiver.doXhr @ sockjs.js?9be2:556
eval @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:731
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
eval @ socket.js?e29c:39
setTimeout (async)
eval @ socket.js?e29c:38
EventTarget.dispatchEvent @ sockjs.js?9be2:170
eval @ sockjs.js?9be2:970
setTimeout (async)
SockJS._close @ sockjs.js?9be2:958
SockJS._transportMessage @ sockjs.js?9be2:898
EventEmitter.emit @ sockjs.js?9be2:86
WebSocketTransport.ws.onmessage @ sockjs.js?9be2:2962
sockjs.js?9be2:1606 GET http://localhost:8080/sockjs-node/info?t=1570258171980 net::ERR_CONNECTION_REFUSED

我平生最讨厌又臭又长的 WARNING 和 ERROR,这里一看我就懂了,我的 vue 跑的机子又不是本地机,你傻乎乎地连本机干啥呢。baka baka!!!

好在恶心过每个 node 开发者的问题早已恶心过先吃螃蟹的人。

https://github.com/vuejs/vue-cli/issues/1472

you should not be mutating publicPath because this value needs to be used in other places in addition to the wepback config. Use the baseUrl option.

yyx 亲自作答,表示应该修改 baseUrl。但他没说怎么改。Google 之:

https://cli.vuejs.org/config/

baseUrl
Deprecated since Vue CLI 3.3, please use publicPath instead.

这家伙又自相矛盾了。

这里说让我修改:vue.config.js,然而最新版根本没有这个文件。Google 之:https://www.google.com/search?q=vue.config.js+not+exists&oq=vue.config.js+not+exists&aqs=chrome..69i57.3517j0j4&sourceid=chrome&ie=UTF-8

https://stackoverflow.com/questions/49423756/vue-cli-3-0-where-is-the-config-file

最自己新建了这个文件。

写入内容参考 github


const path = require('path')

const host = '10.21.143.22'
const port = 8080

module.exports = {
  lintOnSave: false,
  baseUrl: `http://${host}:${port}/`,

  devServer: {
    port,
    host,
    hotOnly: true,
    disableHostCheck: true,
    clientLogLevel: 'warning',
    inline: true,
    headers: {
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
      'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
    },
  }
}

发表留言

本站启用了垃圾评论检测插件,如果误删请联系我~