Why am I getting ERR_CONNECTION_TIMED_OUT in Vue.js?

g miou picture g miou · Sep 30, 2018 · Viewed 8.1k times · Source

After creating a new project with vue cli 3 I get this error:

GET http://192.168.1.13:8080/sockjs-node/info?t=1538257166715 net::ERR_CONNECTION_TIMED_OUT sockjs.js?9be2:1605

Operation system: Windows 10

Answer

Alexey Ryazhskikh picture Alexey Ryazhskikh · Dec 5, 2018

Create vue.config.js with the following code:

module.exports = {
devServer: {

    host: 'localhost'
    }
};

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