vue 运行报错

> two@1.0.0 dev D:\liwanqing everymonth\1701B - VUE\二级菜单,购物车\demo1\two
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 10% bui 10 11% bu 11% bu 11% bu 11% building modules 12/14 modules 2 active ...级菜单,购物车\demo1\two\src\router\inde 1 12% bui 13% bui 13% bui 13% building modules 30/38 modules 8 active ...mo1\two\src\components\HelloWorld.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
 14 14 1 1 1 14 1 1 1 14 14 15 15% building modules 43/45 modules 2 active ... - VUE\二级菜单,购物车\demo1\two\src\App. 1 15 15% bui 1 15 16 16 16 16 95% emitting

 WARNING  Compiled with 3 warnings                                                                              12:37:15


  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:10:1
      props:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'props'
  src\components\left.vue:10:11
      props:{
             ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:12:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:13:1
      components:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'components'
  src\components\left.vue:13:16
      components:{
                  ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:15:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:16:1
      data(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\left.vue:16:9
      data(){
           ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\left.vue:16:11
      data(){
             ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 8
  src\components\left.vue:17:1
          return {
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 8
  src\components\left.vue:19:1
          }
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:20:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:21:1
      computed:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'computed'
  src\components\left.vue:21:14
      computed:{
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:23:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:24:1
      methods:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'methods'
  src\components\left.vue:24:13
      methods:{
               ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:26:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:27:1
      created(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\left.vue:27:12
      created(){
              ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\left.vue:27:14
      created(){
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:29:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:30:1
      mounted(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\left.vue:30:12
      mounted(){
              ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\left.vue:30:14
      mounted(){
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\left.vue:32:1
      }
   ^

  ✘  http://eslint.org/docs/rules/eol-last                     Newline required at end of file but not found
  src\components\left.vue:37:9
  </style>
           ^27 problems (27 errors, 0 warnings)


Errors:
  16  http://eslint.org/docs/rules/indent
   4  http://eslint.org/docs/rules/key-spacing
   3  http://eslint.org/docs/rules/space-before-blocks
   3  http://eslint.org/docs/rules/space-before-function-paren
   1  http://eslint.org/docs/rules/eol-last


  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:10:1
      props:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'props'
  src\components\right.vue:10:11
      props:{
             ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:12:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:13:1
      components:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'components'
  src\components\right.vue:13:16
      components:{
                  ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:15:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:16:1
      data(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\right.vue:16:9
      data(){
           ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\right.vue:16:11
      data(){
             ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 8
  src\components\right.vue:17:1
          return {
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 8
  src\components\right.vue:19:1
          }
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:20:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:21:1
      computed:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'computed'
  src\components\right.vue:21:14
      computed:{
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:23:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:24:1
      methods:{
   ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'methods'
  src\components\right.vue:24:13
      methods:{
               ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:26:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:27:1
      created(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\right.vue:27:12
      created(){
              ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\right.vue:27:14
      created(){
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:29:1
      },
   ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:30:1
      mounted(){
   ^

  ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
  src\components\right.vue:30:12
      mounted(){
              ^

  ✘  http://eslint.org/docs/rules/space-before-blocks          Missing space before opening brace
  src\components\right.vue:30:14
      mounted(){
                ^

  ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
  src\components\right.vue:32:1
      }
   ^

  ✘  http://eslint.org/docs/rules/eol-last                     Newline required at end of file but not found
  src\components\right.vue:37:9
  </style>
           ^27 problems (27 errors, 0 warnings)


Errors:
  16  http://eslint.org/docs/rules/indent
   4  http://eslint.org/docs/rules/key-spacing
   3  http://eslint.org/docs/rules/space-before-blocks
   3  http://eslint.org/docs/rules/space-before-function-paren
   1  http://eslint.org/docs/rules/eol-last


  ✘  http://eslint.org/docs/rules/quotes       Strings must use singlequote
  src\App.vue:9:20
  import myleft from "./components/left"
                      ^

  ✘  http://eslint.org/docs/rules/quotes       Strings must use singlequote
  src\App.vue:10:21
  import myright from "./components/right"
                       ^

  ✘  http://eslint.org/docs/rules/key-spacing  Missing space before value for key 'components'
  src\App.vue:14:14
    components:{
                ^3 problems (3 errors, 0 warnings)


Errors:
  2  http://eslint.org/docs/rules/quotes
  1  http://eslint.org/docs/rules/key-spacing

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

解决方法:1. config/index.js useEslint: true, 改成 false
2. build/webpack.base.conf.js; rules …(config.dev.useEslint ? [createLintingRule()] : []), 注释掉

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值