浏览器控制台错误,请求/sockjs-node/info?t=1555629946494 [英] Errors in browser console, requests to /sockjs-node/info?t=1555629946494

查看:37
本文介绍了浏览器控制台错误,请求/sockjs-node/info?t=1555629946494的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 vue-cli 创建了一个新站点.我正在使用开发服务器来提供页面.当我在浏览器中查看页面时,我看到浏览器控制台中显示两种类型的错误:

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

我不确定它是什么意思,或者它是如何/为什么被调用的,它大约每 5 秒重复出现一次.

I'm not sure what it means, or how/why it's being called, and it shows up repeatedly about every 5 seconds.

推荐答案

我终于使用 devServer.public 配置选项修复了它.

I finally fixed it using the devServer.public configuration option.

下面是我的 vue.config.js 文件:

module.exports = {
    devServer: {
        disableHostCheck: true,
        port: 4000,
        public: '0.0.0.0:4000'
    },
    publicPath: "/"
}

我从阅读this中得到了答案.

I got my answer from reading this.

这篇关于浏览器控制台错误,请求/sockjs-node/info?t=1555629946494的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆