Vuejs Console Errors after changing host name

Vuejs newbie here. I’m creating a simple VueJs application using vue cli 3 and changed the hostname from localhost to pc555 in vue.config.js. Something like this:

module.exports = {
  devServer: {
    host: "pc555",

The application loads fine but there are a lot of console errors.


I am guessing this is related to the hot reload and since I changed the hostname to pc555, it’s not able to find localhost. How do I make these urls go to http://pc555:8080/sockjs-node/info?t=1533154684963 instead of http://localhost:8080/sockjs-node/info?t=1533154684963?

Thanks a lot.

1 Like

You will have to change the devServer.public setting to inform webpack that you want to use that host name for HMR look ups


Thank you! That did it.

Thanks for pointing in right direction.

I added public: “” to my devServer and updated nginx to proxy sockjs-node to vue app. This seems to work for now.
Any idea how to avoid changing proxy?

In my setup, I am running vue behind nginx with ssl. All my urls are using https (obviously). Without adding “public” property, socksjs is trying to use https protocol but wrong host (internal vue host name).

Any idea how to avoid changing proxy?