I created a new site using vue-cli. I'm using the development server to serve the page. When I view the page in my browser, I see two types of errors show up in my browser console:
GET http://172.31.7.153:4000/sockjs-node/info?t=1555922702538 net::ERR_CONNECTION_TIMED_OUT
GET http://localhost:4000/sockjs-node/info?t=1555922708541 net::ERR_CONNECTION_REFUSED
I'm not sure what it means, or how/why it's being called, and it shows up repeatedly about every 5 seconds.
I finally fixed it using the devServer.public
configuration option.
Below is my vue.config.js
file:
module.exports = {
devServer: {
disableHostCheck: true,
port: 4000,
public: '0.0.0.0:4000'
},
publicPath: "/"
}
I got my answer from reading this.