【解决】控制台报错Uncaught TypeError: Object(...) is not a function at eval (vue-router.esm-bundler.js
打开http://localhost:8080/,控制台报错
Uncaught TypeError: Object(...) is not a functionat eval (vue-router.esm-bundler.js?f2fc:2127:1)at Object../node_modules/vue-router/dist/vue-router.esm-bundler.js (app.js:2218:1)at __webpack_require__ (app.js:679:30)at fn (app.js:89:20)at eval (index.js?3672:1:1)at Object../src/router/index.js (app.js:2358:1)at __webpack_require__ (app.js:679:30)at fn (app.js:89:20)at eval (main.js?1c90:1:1)at Object../src/main.js (app.js:2350:1)
cmd运行npm run dev
没有报错,但也没有显示成功
看了好多篇文章,找了好几天的错,也没有找到解决方法,都不管用,找的心累了,这不终于整好了
【解决办法】: 降低vue-router版本
因为vue-router版本过高,所以报错(我的默认版本是4.0.14的版本)
"dependencies": {"element-ui": "^2.15.6","vue": "^2.5.2"},"devDependencies": {"node-sass": "^7.0.1","sass-loader": "^12.6.0","vue-loader": "^13.3.0","vue-router": "^4.0.14",}
1、package.json中修改vue-router版本,然后再npm install下
2、或者在cmd输入
npm install vue-router@3.5.3
再运行npm run dev
,成功了
【解决】控制台报错Uncaught TypeError: Object(...) is not a function at eval (vue-router.esm-bundler.js相关推荐
- layui报错Uncaught TypeError: tree is not a function
layui报错Uncaught TypeError: tree is not a function tree({ elem: "#classtree" , data: data , ...
- JS报错 Uncaught TypeError: undefined is not a function,解决
Chrome调试报错:Uncaught TypeError: undefined is not a function,所有的数据都显示不出来 原因正如错误提示:调用了一个没有定义的方法,实际是一个空值 ...
- Javascript 报错 Uncaught TypeError: x is not a function 常见错误总结
这是我近期犯的比较傻的一个错误,一定要mark一下. 以下代码段是借用父类构造函数来实现继承的一种方法, 不过在ES6已经可以使用类了,这个作为了解对阅读以前的代码还是有好处的. 代码非常简单, 1 ...
- python3运行报错:TypeError: Object of type ‘type‘ is not JSON serializable解决方法(详细)
python3运行报错:TypeError: Object of type 'type' is not JSON serializable解决方法(详细) 参考文章: (1)python3运行报错:T ...
- Vue3.x 报 Uncaught TypeError:Object(...) is not a function( Vue3对象不是函数解决思路)
今天在vue3的练习时候发现我写的路由总是浏览器报错,仔细校验文档发现并没有错误啊,可总是报Uncaught TypeError:Object(...) is not a function的错误,看下 ...
- 立即执行函数报错Uncaught TypeError: (intermediate value) is not a function.
立即执行函数报错Uncaught TypeError: (intermediate value) is not a function. 文章目录 立即执行函数报错Uncaught TypeError: ...
- 小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined
小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined Component({/*** 组件的属性列表*/propert ...
- js代码中for循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting ‘className‘)
jsfor循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting 'className') 我想要 ...
- JsonMap对象的获取与前台浏览器报错Uncaught TypeError: Cannot read property ‘map‘ of undefined
JsonMap对象的获取与前台浏览器报错Uncaught TypeError: Cannot read property 'map' of undefined 经过不断排查以后发现是自己的后台传的值出 ...
最新文章
- 【云栖大会精华汇】历届云栖大会精彩资料大放送,一篇看尽云栖大会前世今生...
- (已解决)ubuntu20.04 jar xvf XXX.zip报错-java.io.EOFException:Unexpected end of ZLIB input stream
- 恭喜我自己装上了Windows Server 2008 R2 和使用Windows Live Writer 写日志
- 博客园在升级的路上,不妨更自信些,同时说说我们可以为博客园做些什么
- HADOOP2.5.0_64安装日志
- 【Elasticsearch】Elasticsearch 基于scoll技术滚动搜索大量数据
- 微信小程序插件---表单验证篇
- ScheduledExecutorService线程调度的使用
- 知道草根如何逆袭吗?
- 为什么说 Julia 更优于 Python?
- 46.Linux/Unix 系统编程手册(下) -- System V 消息队列
- 资管新规这样规定,我的货基该怎么办?
- Intel® Extreme Tuning Utility (Intel® XTU)服务 xtu无法自动启动的问题
- 关于求两个球相交部分体积计算
- 北京的三甲医院都是定点医院吗?不列入医保卡范围不能报销?
- c++string 加引号_Shell 引号嵌套
- win10更新时强制关机会如何
- “诸神之眼”——Nmap端口扫描工具使用小手册
- OEA 中 WPF 树型表格整体重构
- three.js渲染带动画的glb文件(内附源码,保姆级)
热门文章
- 智源社区AI周刊No.100:李飞飞等最新文章:社会化人工智能;DreamFusion:Google发布“文本-3D”生成新成果...
- 美国大学计算机科学博士生排名,2021美国大学本科计算机专业(高学位博士)排名...
- 物理实验室改造前搬迁注意事项有哪些TENAISU
- 贾跃亭妻子甘薇被列入老赖名单;360两高管离职;中国联通正式关闭2G丨价值早报...
- 【MySQL】sys系统库配置表
- DTU是什么及其用途
- 一个即将30岁的Android程序员妄想用他的「逆袭」来劝你不再「焦虑」
- Shiro--解决is not eligible for getting processed by all BeanPostProcessors
- 教育子女正确方式(楼天成父母教育孩子)
- 倾斜补偿的电子罗盘(3):椭球拟合,磁传感器软磁干扰和硬磁干扰的9参数校准