Vue的Debug记录

2020-01-26

一、错误代码 404 not found

  1. 错误信息:This dependency was not found: @/components/HelloWorld in ./src/router/index.js
  2. 错误分析: 在 ./src/router/index.js中有一个叫HelloWorld的依赖组件没有被找到
  3. 错误原因:在使用 vue init webpack中配置了router,其默认将components中的HelloWorld.vue组件引入,但由于我将其删去所以找不到该依赖组件
  4. 解决方案: 在 router/index.js中将有关HelloWorld组件有关内容也一并删去即可

2020-01-27

一、ESLint警示:Expected indentation of 0 spaces but found 2

  1. 警示分析:ESLint的验证规则不一致,但很多时候我们并不需要关于空格和缩进的验证
  2. 解决方案:在.eslintrc.js文件中的rules内添加以下代码,再重新npm start(npm run dev)即可:
	   'no-tabs': 0,
	   'no-mixed-spaces-and-tabs': 0,
	   'indent': ["off", "tab"],
	   'no-trailing-spaces': 0,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值