1. ERROR Failed to compile with 2 errors 12:00: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:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:7051:13)
  7. at formatWithCursor (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:10370:12)
  8. at C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31115:15
  9. at Object.format (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31134:12)
  10. at Object.module.exports (C:\Users\admin\Desktop\222\demo\node_modules\vue-loader\lib\template-compiler\index.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:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:7051:13)
  20. at formatWithCursor (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:10370:12)
  21. at C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31115:15
  22. at Object.format (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31134:12)
  23. at Object.module.exports (C:\Users\admin\Desktop\222\demo\node_modules\vue-loader\lib\template-compiler\index.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

解决方法:

  1. npm i prettier@~1.12.0

重新运行:

  1. npm run dev

原因是prettier 更新到1.13.0导致的

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

vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.的更多相关文章

  1. 出现报错: module build failed error couldn't find preset es2015 relative to directory

    当用webpack 进行 build 的时候, 会出现如上标题的错误, 解决方式是在 上级 或者 上上级目录,删除 .babelrc 文件

  2. vue-cli 报Module build failed: Error: No parser and no file path given, couldn't infer a parser.错的解决方法

    出错提示如下: ERROR Failed to compile with errors :: error in ./src/App.vue Module build failed: Error: No ...

  3. nuxt/eapress 安装报错Module build failed: ValidationError: PostCSS Loader Invalid OptionsModule build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] is an invalid additi

    错误信息: Module build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] ...

  4. webpack搭建项目时出现的报错“Module build failed (from ./node_modules/css-loader/dist/cjs.js) CssSyntaxError”

    控制台出现的错误如下: webpack.config.js中的配置如下: module.exports={ entry:'./src/main.js', output:{ path:__dirname ...

  5. vue项目报错,解决Module build failed: Error: Cannot find module 'node-sass' 问题

    1.报错问题 1 E:\WebStormFile\treehole-manage>npm run dev > xc-ui-pc-sysmanage@1.0.0 dev E:\WebStor ...

  6. 配置web pack loader 报错:Module build failed: Error: The node API for `babel` has been moved to `babel-core`.

    报错如下 Module build failed: Error: The node API for `babel` has been moved to `babel-core`. 在我配置loader ...

  7. Vue, element-ui Module build failed: Error: No PostCSS Config found

    使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们吧把需要的东西都装在好运行项目的时候,有时会出现这样的错误, Module build failed: Error: N ...

  8. Vue.js报错Failed to resolve filter问题原因

    Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...

  9. Module build failed: Error: Cannot find module 'url-loader' 的坑

    本文地址:http://www.cnblogs.com/jying/p/8280956.html 开发环境:react.webpack.es5 引用图片报错:Module build failed: ...

随机推荐

  1. SQLServer与MySQL约束/索引命名的一些差异总结

    约束是数据库完整性的保证,主要分为:主键/外键/唯一键/默认值/check等类别,约束是一个逻辑概念,表示数据的某些特性(不能为空,唯一,必须满足某些条件等等),索引是一个逻辑与物理概念的结合,逻辑上 ...

  2. matplotlib绘图基本用法-转自(http://blog.csdn.net/mao19931004/article/details/51915016)

    本文转载自http://blog.csdn.net/mao19931004/article/details/51915016 <!DOCTYPE html PUBLIC "-//W3C ...

  3. yarn安装及node升级

    ERROR: root@debian:/home/test/keygen-radio-master/scripts# npm install -g yarn npm WARN engine yarn@ ...

  4. jquery中checkbox的选中,反选,全不选 注意1.6版本以上将attr改成prop

    <script type="text/javascript"> $(function () { // 全选 $("#btnCheckAll").bi ...

  5. jenkins登录后页面显示为空的问题

    1.然后再打开一个新的窗口,输入网址http://localhost:8080/jenkins/pluginManager/advanced,输入网址打开后滑动到页面下方,最底下有个[升级站点],把其 ...

  6. 怎样用Python的Scikit-Learn库实现线性回归?

    来源商业新知号网,原标题:用Python的Scikit-Learn库实现线性回归 回归和分类是两种 监督 机器 学习算法, 前者预测连续值输出,而后者预测离散输出. 例如,用美元预测房屋的价格是回归问 ...

  7. neo4j性能调优(转)

    最近在公司实习做的就是优化neo4j图形数据库查询效率的事,公司提供的是一个在Linux上搭建且拥有几亿个节点的数据库.开始一段时间主要是熟悉该数据库的一些基本操作,直到上周才正式开始步入了优化数据库 ...

  8. jQuery入门学习

    一.jQuery的介绍 1.jQuery是一种轻量级的.兼容多浏览器的JavaScript库. 2.jQuery使用户能够方便处理HTML Document Events 实现动画效果.方便的进行Aj ...

  9. vue 下拉刷新 上拉加载(vue-scroller)

    <template> <div class="wdRecordCon"> <x-header :left-options="{backTex ...

  10. java使用selenium版本不兼容解决汇总

    selenium之webDriver与浏览器版本问题 http://blog.csdn.net/xqhadoop/article/details/77892796 selenium自动化测试资源整理( ...