问题描述:

vue创建项目打开页面后可以运行正常,就是控制台一直报websocket的connection错误

WebSocket connection to 'ws://192.168.51.116:3000/ws' failed: 

解决方案:

在网上找到一个靠谱的方法了,修改vue.config.js里的devServer配置

 devServer:{host: '0.0.0.0',port:3000,client: {webSocketURL: 'ws://0.0.0.0:3000/ws',},headers: {'Access-Control-Allow-Origin': '*',}}

重启后就不报错了。

vue 报错:WebSocket connection to ‘ws://192.168.51.116:3000/ws‘ failed:相关推荐

  1. 解决mac报错ssh:connect to host 192.168.xx.xxx port 22: Connection refused

    遇到的问题 机器A ssh连接 机器B失败,机器B ssh连接 机器A成功 mac在ssh远程登录的过程中出现报错ssh:connect to host 192.168.xx.xxx port 22: ...

  2. 使用telnet命令检测端口是否正常报错“telnet: connect to address 192.168.88.132: Connection refused“

    异常 原因 在192.168.88.132主机中8066端口没有被用到. 例如我们访问mysql的3306端口就能成功检测到 因为在目标主机192.168.88.132中mysql是启动状态 当我们在 ...

  3. 连接数据库报错 -- Access denied for user ‘‘@‘192.168.121.1‘ (using password: NO)

    问题: 用idea配置好数据库配置文件application.yml,在连接虚拟机数据库时,控制台报错:Access denied for user ''@'192.168.121.1' (using ...

  4. redis集群报错:(error) MOVED 11469 192.168.163.249:7002

    应该是你没有启动集群模式(即缺少了那个"-c"): redis-cli -c -h yourhost -p yourpost

  5. Vue报错:sockjs.js?9be2:1627 GET http://192.168.43.88:8080/sockjs-node/info?t=1631603986586 net::ERR_CO

    Vue报错:sockjs.js?9be2:1627 GET http://192.168.43.88:8080/sockjs-node/info?t=1631603986586 net::ERR_CO ...

  6. 03-Redis客户端连接Redis服务器(redis.conf 文件配置没有生效导致redis运行报错Error: Connection reset by peer)

    参考此链接配置 redis.conf,然后本文章才能继续操作 EditPlus连接Centos7修改Redis配置文件(建议FinalShell修改更加方便)https://blog.csdn.net ...

  7. Vue报错:Error while running task D:\vue\forum:build with message‘spawn vue-cli-service ENOENT‘

    Vue报错:Error while running task D:\vue\vueforum\forum:build with message'spawn vue-cli-service ENOENT ...

  8. vue 报错unknown custom element解决方法

    vue 报错unknown custom element解决方法 参考文章: (1)vue 报错unknown custom element解决方法 (2)https://www.cnblogs.co ...

  9. vue 报错 Cannot read property ‘__ob__‘ of undefined的解决方法

    vue 报错 Cannot read property '__ob__' of undefined的解决方法 参考文章: (1)vue 报错 Cannot read property '__ob__' ...

最新文章

  1. 自定义控件 DotNetBar
  2. 如何将Git存储库克隆到特定文件夹?
  3. python【数据结构与算法】 python3 deque模块(双端队列)
  4. Llama-impala on yarn的中间协调服务
  5. jQuery之ajax的跨域获取数据
  6. Restic 跨平台加密备份工具
  7. android listview标题置顶,Android仿QQ左滑删除置顶ListView操作
  8. C语言学习笔记--数组参数和指针参数
  9. spring+hibernate中clob、blob字段的处理方法
  10. jenkins, docker-composer
  11. 异常事件检测论文汇总(Abnormal Event Detection)
  12. 辅助驾驶功能开发-功能规范篇(05)-智能限速辅助SLA
  13. cocos2dx3.16输入框:TextField和EditBox的使用
  14. 使用fiddle处理跨域
  15. GAT - Graph Attention Network 图注意力网络 ICLR 2018
  16. python设计一个函数定义计算并返回n价调和函数_python函数的调和平均值?
  17. 【HNS】试着领一下 HandShake 为开源社区发放的 HNS Coin
  18. 恒大打响谣言“反击战”
  19. MongoDB_实战部分(二)
  20. js小学生图片_我是小学生图片

热门文章

  1. 列出叶节点 python
  2. 万国觉醒迁服务器显示该王国还未开放,万国觉醒的定点迁城怎么用?怎么获得定点迁城?...
  3. 全新电影社交观影,满足影迷移动巨幕与移动3D体验
  4. 51单片机程序烧写说明
  5. 今天的一点杂感-20220414
  6. 软件“生命”系统进化论——软件以负熵为生
  7. 手机端Alook浏览器手动抓取京东Cookie教程
  8. 什么是大数据分析 主要应用于哪些行业?以制造业为例
  9. 技校毕业是什么学历_技校毕业后是什么学历什么文凭?
  10. 单反相机坏点和噪点测试软件,单反相机验机及坏点测试方法(多数适用于佳能)...