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

    ERROR  Failed to compile with 2 errors                                                                         12:00:33
    
     error  in ./src/App.vue
    
    Module build failed: Error: No parser and no file path given, couldn't infer a parser.
        at normalize (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:7051:13)
        at formatWithCursor (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:10370:12)
        at C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31115:15
        at Object.format (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31134:12)
        at Object.module.exports (C:UsersadminDesktop222demo
    ode_modulesvue-loaderlib	emplate-compilerindex.js:80:23)
    
     @ ./src/App.vue 11:0-354
     @ ./src/main.js
     @ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server ./src/main.js
    
     error  in ./src/components/HelloWorld.vue
    
    Module build failed: Error: No parser and no file path given, couldn't infer a parser.
        at normalize (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:7051:13)
        at formatWithCursor (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:10370:12)
        at C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31115:15
        at Object.format (C:UsersadminDesktop222demo
    ode_modulesprettierindex.js:31134:12)
        at Object.module.exports (C:UsersadminDesktop222demo
    ode_modulesvue-loaderlib	emplate-compilerindex.js:80:23)
    
     @ ./src/components/HelloWorld.vue 11:0-366
     @ ./src/router/index.js
     @ ./src/main.js
     @ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server ./src/main.js

    解决方法:

    npm i prettier@~1.12.0

    重新运行:

    npm run dev

    原因是prettier 更新到1.13.0导致的

    欢迎加入大前端交流群!群号:277942610,VIP新群

  • 相关阅读:
    [原] Code Color Scheme
    [转] 13款开源Java大数据工具,从理论到实践的剖析
    如何在Web页面上直接打开、编辑、创建Office文档 (转)
    自己用VS2008写的数据库操作包装类
    可以用ORACLE的临时表
    ASP.net中动态加载控件时一些问题的总结(转)
    Infragistics.WebUI.WebCombo的用法
    oracle中创建表的一种方法
    oracle中插入一个blob数据
    中国人正在上的四个当
  • 原文地址:https://www.cnblogs.com/liumingwang/p/9100536.html
Copyright © 2011-2022 走看看