zoukankan      html  css  js  c++  java
  • vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.

     1 ERROR  Failed to compile with 2 errors                                                                         15:23:33
     2 
     3  error  in ./src/App.vue
     4 
     5 Module build failed: Error: No parser and no file path given, couldn't infer a parser.
     6     at normalize (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:7051:13)
     7     at formatWithCursor (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:10370:12)
     8     at C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31115:15
     9     at Object.format (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31134:12)
    10     at Object.module.exports (C:UsersadminDesktop222demo
    ode_modulesvue-loaderlib	emplate-compilerindex.js:80:23)
    11 
    12  @ ./src/App.vue 11:0-354
    13  @ ./src/main.js
    14  @ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server ./src/main.js
    15 
    16  error  in ./src/components/HelloWorld.vue
    17 
    18 Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    19     at normalize (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:7051:13)
    20     at formatWithCursor (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:10370:12)
    21     at C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31115:15
    22     at Object.format (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31134:12)
    23     at Object.module.exports (C:UsersadminDesktop222demo
    ode_modulesvue-loaderlib	emplate-compilerindex.js:80:23)
    24 
    25  @ ./src/components/HelloWorld.vue 11:0-366
    26  @ ./src/router/index.js
    27  @ ./src/main.js
    28  @ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server ./src/main.js

    解决方法:

    npm i prettier@~1.12.0

    重新运行:

    npm run dev

    本文参考:http://www.cnblogs.com/tw6668/p/9099647.html#3984473

  • 相关阅读:
    关于VGG网络的介绍
    nvidia-docker 安装
    test
    ARTS-S EN0002-London HIV patient's remission spurs hope for curing AIDS
    ARTS-S EN0001-In tech race with China, US universities may lose a vital edge
    ARTS-S Why do India and Pakistan keep fighting over Kashmir?
    ARTS-S sed指定行添加
    ARTS-S linux查看进程打开的文件数
    ARTS-S centos查看端口被哪个进程占用
    ARTS-S centos修改hostname
  • 原文地址:https://www.cnblogs.com/jocelyn-liu/p/9100592.html
Copyright © 2011-2022 走看看