vue 报错:WebSocket connection to ‘ws://192.168.51.116:3000/ws‘ failed:
问题描述:
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:相关推荐
- 解决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: ...
- 使用telnet命令检测端口是否正常报错“telnet: connect to address 192.168.88.132: Connection refused“
异常 原因 在192.168.88.132主机中8066端口没有被用到. 例如我们访问mysql的3306端口就能成功检测到 因为在目标主机192.168.88.132中mysql是启动状态 当我们在 ...
- 连接数据库报错 -- Access denied for user ‘‘@‘192.168.121.1‘ (using password: NO)
问题: 用idea配置好数据库配置文件application.yml,在连接虚拟机数据库时,控制台报错:Access denied for user ''@'192.168.121.1' (using ...
- redis集群报错:(error) MOVED 11469 192.168.163.249:7002
应该是你没有启动集群模式(即缺少了那个"-c"): redis-cli -c -h yourhost -p yourpost
- 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 ...
- 03-Redis客户端连接Redis服务器(redis.conf 文件配置没有生效导致redis运行报错Error: Connection reset by peer)
参考此链接配置 redis.conf,然后本文章才能继续操作 EditPlus连接Centos7修改Redis配置文件(建议FinalShell修改更加方便)https://blog.csdn.net ...
- 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 ...
- vue 报错unknown custom element解决方法
vue 报错unknown custom element解决方法 参考文章: (1)vue 报错unknown custom element解决方法 (2)https://www.cnblogs.co ...
- vue 报错 Cannot read property ‘__ob__‘ of undefined的解决方法
vue 报错 Cannot read property '__ob__' of undefined的解决方法 参考文章: (1)vue 报错 Cannot read property '__ob__' ...
最新文章
- 自定义控件 DotNetBar
- 如何将Git存储库克隆到特定文件夹?
- python【数据结构与算法】 python3 deque模块(双端队列)
- Llama-impala on yarn的中间协调服务
- jQuery之ajax的跨域获取数据
- Restic 跨平台加密备份工具
- android listview标题置顶,Android仿QQ左滑删除置顶ListView操作
- C语言学习笔记--数组参数和指针参数
- spring+hibernate中clob、blob字段的处理方法
- jenkins, docker-composer
- 异常事件检测论文汇总(Abnormal Event Detection)
- 辅助驾驶功能开发-功能规范篇(05)-智能限速辅助SLA
- cocos2dx3.16输入框:TextField和EditBox的使用
- 使用fiddle处理跨域
- GAT - Graph Attention Network 图注意力网络 ICLR 2018
- python设计一个函数定义计算并返回n价调和函数_python函数的调和平均值?
- 【HNS】试着领一下 HandShake 为开源社区发放的 HNS Coin
- 恒大打响谣言“反击战”
- MongoDB_实战部分(二)
- js小学生图片_我是小学生图片
热门文章
- 列出叶节点 python
- 万国觉醒迁服务器显示该王国还未开放,万国觉醒的定点迁城怎么用?怎么获得定点迁城?...
- 全新电影社交观影,满足影迷移动巨幕与移动3D体验
- 51单片机程序烧写说明
- 今天的一点杂感-20220414
- 软件“生命”系统进化论——软件以负熵为生
- 手机端Alook浏览器手动抓取京东Cookie教程
- 什么是大数据分析 主要应用于哪些行业?以制造业为例
- 技校毕业是什么学历_技校毕业后是什么学历什么文凭?
- 单反相机坏点和噪点测试软件,单反相机验机及坏点测试方法(多数适用于佳能)...