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:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:7051:13)
at formatWithCursor (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:10370:12)
at C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31115:15
at Object.format (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31134:12)
at Object.module.exports (C:\Users\admin\Desktop\222\demo\node_modules\vue-loader\lib\template-compiler\index.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:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:7051:13)
at formatWithCursor (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:10370:12)
at C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31115:15
at Object.format (C:\Users\admin\Desktop\222\demo\node_modules\prettier\index.js:31134:12)
at Object.module.exports (C:\Users\admin\Desktop\222\demo\node_modules\vue-loader\lib\template-compiler\index.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新群

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. js自动时间

    function showTime() { //时间 nowtime = new Date(); year = nowtime.getFullYear(); month = nowtime.getMo ...

  2. Game Engine Architecture 8

    [Game Engine Architecture 8] 1.Differences across Operating Systems • UNIX uses a forward slash (/) ...

  3. 需要重写URL但请求的目录不存在报404

    用的是asp.net webform,在global.asax的application_beginrequest中写的代码 很简单的一个需求,在url中输入http://www.test.com/lc ...

  4. Spring MVC随笔记录

    根据https://blog.csdn.net/abc997995674/article/details/80353410整理 @ModelAttribute 可以用在方法.方法参数上,也可以和@re ...

  5. 窗体背景和png

    窗体背景不要使用png格式图片,当窗体组件透明时,png会带来无穷的麻烦. 能不用png就不要用,截取图像也不要用Format32bppPArgb,特殊情况除外 Bitmap bkbmp = (Ima ...

  6. ambiguous

    ambiguous - 必应词典 美[æm'bɪɡjuəs]英[æm'bɪɡjuəs] adj.模棱两可的:含混不清的:多义的:不明确的 网络含糊的:模糊的:暧昧的 搭配ambiguous answe ...

  7. 使用Fiddle对夜神模拟器进行抓包的设置

    注意: 设置完后, 不开启 Fiddle 的话,模拟器就不能上网了.  可以通过再把网络配置 改回去 就可以恢复网络正常访问了 一.配置Fiddle参数设置 1.Tools->Options 2 ...

  8. Quartz.Net进阶之七:QuartzNet其他的功能简述

    一.介绍 今天是这个系列的最后一篇文章了,主要功能说的差不多了,我们来看看其他相关的内容.话说回来,虽然是这个系列的最后一篇文章,并不代表Quartz的东西就这么点,学习阶段,就这些了,如果以后有了使 ...

  9. js项目练习第一课

    控制div属性 <style> .c1 { width:200px; height:200px; background-color: #000; display: block; margi ...

  10. day 14:深浅copy,数据结构 ,函数,set集合,变量作用域、返回值

    本节内容: 1,深浅copy 2,数据结构 3,函数 4,变量作用域 5,返回值,return 一.深浅copy 首先理解当给变量赋值的时候,是给变量存在值所在的内存地址 a = 10000 b = ...