![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
问题报错
吾处话凄凉
这个作者很懒,什么都没留下…
展开
-
Jest报错:Unknown custom element: <router-link> - did you register the component correctly?
在使用Jest进行Vue单元测试的时候,终端报错Unknown custom element: - did you register the component correctly?现象在我们进行测试的部分出现了<router-link`>标签进行页面跳转,在测试的时候却报错。解决方案:在测试代码注入组件名称部分使用以下代码,component是你要测试的组件名称shallowMount(Component, { stubs: ['router-link', 'router-v原创 2021-03-12 20:55:20 · 994 阅读 · 0 评论 -
Jest报错:ReferenceError: regeneratorRuntime is not defined
在使用Jest做单元测试的时候,报错● Test suite failed to run ReferenceError: regeneratorRuntime is not defined查阅资料通过下面解决了:第一步安装插件npm install @babel/plugin-transform-runtime --save-dev第二步在babel.config.js添加插件"env": { "test": { "plugins": ["@babel/plug原创 2021-03-12 18:59:18 · 1502 阅读 · 0 评论 -
读取res.data.data数据后,vue却不渲染不显示,同时也不报错
在练习vue的时候使用axios从后台获取数据返回前端后,想将数据渲染上去的,我原先的想法是获取对应选项,进入详情页,将其数据进行渲染,但是,vue不显示数据,也不报错,代码如下<template> <div class="about"> <h1>{{id ? '编辑':'新建'}}博客</h1> <!-- native表示原生表单,prevent表示不要跳转 --> <el-form原创 2020-12-15 23:42:07 · 4217 阅读 · 0 评论 -
使用vue报错:type check failed for prop “data“. Expected Array, got Object
在使用axios返回前端的数据时报错:type check failed for prop “data”. Expected Array, got Object事实上,我们从题目就能知道我们给出了对象,他要的是数组array,而我们给了objcet对象我原来的代码如下<script>export default { data(){ return { items: [] } }, methods:{原创 2020-12-14 19:15:49 · 3836 阅读 · 1 评论 -
vue报错最常见可能:Failed to mount component: template or render function not defined.
在练习使用vue的时候发现了,创建了新的**.vue**视图文件,也有添加template但是启动项目后报错Failed to mount component: template or render function not defined.,阅读资料后三种可能:1、路径写错2、版本问题,有人说降低vue-loader版本,据说该同学是在router/index.js下引入时采用懒加载写法,只需将后缀 .vue 补上即可3、 加载问题(个人解决方案):个人以上问题均无,报错后,将整个文件删除重新粘贴原创 2020-11-23 21:06:44 · 5898 阅读 · 5 评论 -
Mongod设置成服务报错:服务名无效
Mongodb服务名无效我们在安装mongod的时候如果每次都需要去使用命令行太过麻烦,所以我们将其加到我们的电脑服务里面,之后只需作为一项服务启动即可,但是我们在实际操作过程中会出现服务名无效的情况原因在将mongodb作为服务添加到电脑的过程中不是在管理员模式下添加,虽没报错,实际没加进去解决使用管理员模式重新添加即可配置MongoDBWindows配置MongoDB...原创 2020-03-20 02:07:54 · 250 阅读 · 0 评论 -
Windows下Elasticsearch启动一闪而过报错
现象windows在安装Elasticsearch的过程中,启动elasticsearch.bat的时候,黑窗口一闪而过,启动失败,这个时候我们可以到elasticsearch目录下的logs文件夹下查看日志情况,报错情况如下:[2019-05-07T18:39:13,452][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [hdzx...原创 2020-03-20 01:18:56 · 3192 阅读 · 0 评论 -
org.springframework.beans.factory.UnsatisfiedDependencyException报错解决
在使用mybatis自动生成代码后,启动后报错org.springframework.beans.factory.UnsatisfiedDependencyException在网上找了好久,都不对应,事实上是每个人可能的报错原因都不一样,比如我报错原因拉到最底部是java.lang.IllegalArgumentException: Result Maps collection already...原创 2020-03-16 11:46:32 · 1315 阅读 · 0 评论 -
Git报错:fatal: refusing to merge unrelated histories
当你使用git提交代码时出现Your branch and 'origin/master' have diverged,and have 1 and 1 different commits each, respectively. (use "git pull" to merge the remote branch into yours)而当你使用git pull时,又出现fatal:...原创 2020-03-09 03:09:59 · 362 阅读 · 0 评论 -
@ConfigurationProperties不生效,对比@Value
@ConfigurationProperties 和 @Value 都是 Spring 提供的用于从配置文件注入配置信息的方式。很显然,@Value 比较适用于配置比较少的场景,而 @ConfigurationProperties 则更适用于有很多配置的情况。之前几乎每次都是使用 @Value。这次遇到了一个比较适合@ConfigurationProperties的场景,在使用的时候还真遇到了一些...原创 2019-09-21 23:43:12 · 21544 阅读 · 10 评论 -
spring boot项目运行报错:Protocol handler start failed
spring boot项目运行报错:Protocol handler start failed这是端口被占用了,解决方法:打开cmd,输入:netstat -ano | findstr 8080(查询8080端口的pid)关闭进程(cmd需以管理员模式运行):taskkill /pid 3508 -f...原创 2019-07-03 13:52:12 · 1771 阅读 · 0 评论 -
Failed to read artifact descriptor for xxxjar的问题解决
Failed to read artifact descriptor for xxx:jar的问题解决在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误。其实遇到“Failed to read artifact descriptor for xxx:jar”的...原创 2019-07-03 13:46:34 · 1873 阅读 · 0 评论