报错汇总!

1、vue eslint报错:Component name "index" should always be multi-word.eslintvue/multi-word-component-names的四种解决方式

参考博客:https://blog.csdn.net/u013078755/article/details/123581070

2、对于vue中eslint配置error The template root requires exactly one element vue/no-multiple-templat,如果报了如下错误:

3、ESLint: 'res' is defined but never used.(no-unused-vars) : 定义未使用!关闭eslint校验!

"no-unused-vars":"off"

4、解决Element-ui导航栏在vue-router中重复点击菜单报错问题:

// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

5、ESLint: Failed to load config “standard“ to extend from.

# 解决方案1
yarn add eslint-plugin-promise eslint-plugin-node eslint-plugin-import eslint-plugin-standard eslint-config-standard -D

# 解决方案2
npm i --save-dev eslint-plugin-promise
npm i --save-dev eslint-plugin-node
npm i --save-dev eslint-plugin-import
npm i --save-dev eslint-plugin-standard
npm i --save-dev eslint-config-standard

# 解决方案3
eslintric.js文件中的extend配置项’standard’出问题了,可以暂时删掉它~

# 在这里总结这几种,根据自己的情况进行处理!

如果还是报错,可以试试一下处理方案:(使用vetur进行处理 fix)
参考博客:https://blog.csdn.net/m13423/article/details/121624556

6、可能会遇到vetur不生效的问题:

参考博客:https://blog.csdn.net/qq_54196403/article/details/124252023

7、ESLint 的介绍和使用以及ESLin不能使用的问题:

参考博客:https://blog.csdn.net/weixin_58515303/article/details/121058180

8、2 errors and 0 warnings potentially fixable with the `--fix` option,vue-cli3中eslint详解:

参考博客:https://blog.csdn.net/wron_path/article/details/104655844

9、Vue中通过配置eslintrc.js文件来解决编译时出现的no-trailing-spaces、no-undef等错误:

参考博客:https://blog.csdn.net/sunxiaoju/article/details/109375917

10、Failed to load config “plugin:vue/essenti al“ to extend from.

参考博客:https://blog.csdn.net/u010227042/article/details/125009134

11、各种管理eslint的方法:

参考博客:https://blog.csdn.net/qq_37550440/article/details/124981084

12、Vue组件命名报错 “Component name “XXX“ should always be multi-word”的解决方法

参考博客:https://blog.csdn.net/dxnn520/article/details/125252353

13、"export ‘createStore’ was not found in 'vuex’报错:

遇到这个问题的话可能使我们的vuex版本问题要注意3.x与4.x版本的变更!

参考博客:https://blog.csdn.net/weixin_45525653/article/details/124927074

14、3分钟完美解决错误:Cannot find module 'eslint/lib/formatters/stylish':

参考博客:https://blog.csdn.net/weixin_33957648/article/details/91433168

15、记录大坑的一天:一定要注意我们的 Element Dialog 弹窗中的 dialogVisible ,如果你是想要在表单中进行新增或者保存的时候关闭或者打开弹窗,那么你要使用的是 dialogFormVisible,如果是表格:dialogTableVisible,一定要注意不是 dialogVisible!

<el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>

dialogVisible = true:dialogVisible 这个局部变量控制着弹窗的显示隐藏( true 为显示,false 为隐藏)

<el-dialog title="提示" :visible.sync="dialogVisible" :before-close="handleClose">
  <span>这是一段信息</span>
  <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
</el-dialog>

:visible.sync="dialogVisible":dialogVisible 这个局部变量控制着弹窗的显示隐藏( true 为显示,false 为隐藏)

data定义:
 data() {
      return {
        dialogVisible: false
      };
    }
    如果不懂,参考博客:https://blog.csdn.net/qq_41402200/article/details/85039111

16、One record is expected, but the query result is multiple records 如果遇到这个错误,那就是你数据库的 数据不是一条,而是有重复的!

17、【报错】Illegal character: U+ 200B:

代码中无明显错误,但是一直报错:Illegal character: U+ 200B

解决方法:

将编码换为iso,会看到报错的代码后面多了一个?,删去这个多余的?,再将编码切回utf-8

18、在js中出现下面的错误:Uncaught SyntaxError: Unexpected identifier可能的原因是:

1.有可能是字符串类型的,但是并没有加双引号。

2.有的是没有加逗号 “,”仔细检查便好。

3.如果是jsp的话仔细检查下js中的声明,int与var不同!

4.有的是{}与()的区别。如:Code:{"#code"},改成 Code:("#code"),即可。

19、Vue中使用el-data-picker报错([Vue warn]: Avoid mutating a prop directly since the value will be overwritt:

# 报错内容
Vue warn:Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop’s value. Prop being mutated: “placement”

# 解决方案: 
 # 一、将element-ui的版本更新为2.15.8
 -- npm uninstall element-ui
 -- npm install element-ui@2.15.8
 
 # 二、直接修改package.json中的版本
 -- 首先element-ui的版本更新为2.15.8
 -- 然后 yarn 或者 npm install

20、java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/book?characterEncoding=UTF-8:对于这个报错,解决方案如下所示:

# 如果确定没有写错驱动信息的情况,建议将mysql驱动更换version可以解决!
# 参考文章:https://blog.csdn.net/Alan_King79/article/details/115429709
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值