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 parser and no file path given, couldn't infer a p
arser.
at normalize (D:\works\node_modules\prettier\index.js::)
at formatWithCursor (D:\works\node_modules\prettier\index.js::)
at D:\works\node_modules\prettier\index.js::
at Object.format (D:\works\node_modules\prettier\index.js::)
at Object.module.exports (D:\works\node_modules\vue-loader\lib\template-compiler\index.js::) @ ./src/App.vue :-
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-serve
r ./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 (D:\works\node_modules\prettier\index.js::)
at formatWithCursor (D:\works\node_modules\prettier\index.js::)
at D:\works\node_modules\prettier\index.js::
at Object.format (D:\works\node_modules\prettier\index.js::)
at Object.module.exports (D:\works\node_modules\vue-loader\lib\template-compiler\index.js::) @ ./src/components/HelloWorld.vue :-
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-serve
r ./src/main.js
解决方法是安装prettier
npm i prettier@~1.12.
vue-cli 报Module build failed: Error: No parser and no file path given, couldn't infer a parser.错的解决方法的更多相关文章
- 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 ...
- 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 ...
- 配置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 ...
- Vue, element-ui Module build failed: Error: No PostCSS Config found
使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们吧把需要的东西都装在好运行项目的时候,有时会出现这样的错误, Module build failed: Error: N ...
- Module build failed: Error: Cannot find module 'url-loader' 的坑
本文地址:http://www.cnblogs.com/jying/p/8280956.html 开发环境:react.webpack.es5 引用图片报错:Module build failed: ...
- MODULE BUILD FAILED: ERROR: COULDN’T FIND PRESET “ES2015” RELATIVE TO DIRECTORY
npm run dev 遇到报错: Module build failed: Error: Couldn't find preset "es2015" relative to di ...
- Module build failed: Error: Cannot find module 'node-sass'
安装npm 遇到 Module build failed: Error: Cannot find module 'node-sass' 这次通过重装 npm 完成 先卸载npm npm uninsta ...
- 【Problem】前端项目运行:Module build failed:Error Node Sass does not yet support my current environmen
我在运行renren-fast-vue前端项目时,安装完依赖cnpm install 启动服务npm run dev 出现问题. Module build failed: Error: Node Sa ...
- vue项目npm run dev 报错error in ./src/main.js Module build failed: Error: Cannot find module 'babel-plugin-syntax-jsx'
问题: vue 项目npm run dev运行时报错,如下图: 原因: 缺少相应的组件 解决办法: 安装相应组件: npm install babel-plugin-syntax-jsx --sav ...
随机推荐
- spring事务详解(二)简单样例
系列目录 spring事务详解(一)初探事务 spring事务详解(二)简单样例 spring事务详解(三)源码详解 spring事务详解(四)测试验证 spring事务详解(五)总结提高 一.引子 ...
- HashTable & HashMap & ConcurrentHashMap 原理与区别
一.三者的区别 HashTable HashMap ConcurrentHashMap 底层数据结构 数组+链表 数组+链表 数组+链表 key可为空 否 是 否 value可为空 否 是 否 ...
- react super() and super(props)
subclass: subclass is a class that extends another class. 即子类. In ES2015, to use 'this' in subclasse ...
- USD词汇表(USD Glossary)
这篇文章是在学习USD的过程中龟速写成的,目的是将USD的核心设计.相关概念的说明.以及配套API整理出来,为后续进行的USD开发工作提供中文资料支持. 实际上也只有充分理解了USD设计中的每一个知识 ...
- SQL数据库日志清理
USE [master] GO ALTER DATABASE HCPM_01_181230 SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE HCP ...
- Office2010安装出现“错误1907”的解决方法(未验证)
http://bbs.pcbeta.com/viewthread-1627988-1-5.html 这个问题我遇到过.解决方法:1.安装时提示错误选择忽略,安装完成后.2.如果能正常使用OFFICE软 ...
- axure8.0激活
Licensee:米 业成 (STUDENT)Key:nFmqBBvEqdvbiUjy8NZiyWiRSg3yO+PtZ8c9wdwxWse4WprphvSu9sohAdpNnJK5
- memcached—Java操作Memcached实例
前面博客介绍了如何在Windows操作系统中安装Memcached,总结一下如何使用Java操作Memcached实例: 代码一: package com.ghj.packageoftool; imp ...
- JAVA除法保留小数点后两位的两种方法
1.(double) (Math.round(sd3*10000)/10000.0); 这样为保持4位 (double) (Math.round(sd3*100)/100.0); 这样为保持2位 ...
- Ubuntu下把缺省的dash shell修改为bash shell
Ubuntu下缺省使用的是shell是dash,而不是bash.从/bin/sh软连接的指向可以看出这点. dash shell 虽然比bash shell更轻便,但是它并不支持所有的语法,运行she ...