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 ...
随机推荐
- 19.1 PORT CONTROL DESCRIPTIONS
[原文] PORT CONFIGURATION REGISTER (GPACON-GPJCON) In S3C2440A, most of the pins are multiplexed pins. ...
- c# BackgroundWorker初试
/* * Created by SharpDevelop. * User: Administrator * Date: 2017/7/31 * Time: 16:18 * * To change th ...
- docker-solr 使用host模式修改默认的8983端口号
1.使用root账号进入docker-solr docker exec -it 127627ab6247 -u root /bin/bash 2.安装vim apt-get update apt-ge ...
- 关于memset的错误使用
我们在使用memset进行初始化的时候,经常会使用这种方式,memset(a,0,sizeof(a)),这让我们误以为将其初始化其他值也可以,实际是错误的. void print_arr(unsign ...
- Vue.js中ref ($refs)用法举例总结
原文地址:http://www.cnblogs.com/xueweijie/p/6907676.html <div id="app"> <input type=& ...
- 如何在本地同时管理github仓库和codingnet仓库?
本文的前提条件是你在电脑上接入了github或者gitlab的仓库,现在要接入codingnet的仓库. 电脑上已经有了 github 的 ssh key,怎么继续接入codingnet 的git仓库 ...
- CSS控制文字显示一行,超出显示省略号
这几天在项目需求里面遇到了很多之前没做过的需求,也慢慢更加认识到了css的强大,是真的强大.以后会把自己技术调研的东西都写出来,哪怕只是一点点或者很小的点,重在学习. “CSS控制文字显示一行,超出显 ...
- 在windows下安装、配置、运行PostgreSQL【转】
安装PostgreSQL 在Windows下的安装就位无脑安装,选择好安装路径就好了,我的安装目录为D:\PostgreSQL\10,需要注意一下几点: 安装过程中需要一个数据库的目录,我的为D:\P ...
- IntelliJ IDEA取消自动import所有import *
自动导入新类的时候,往往会把几个import合并为一个*,如何只单独import单个类:
- 一本通之 一堆迷宫 (Dungeon Master&走出迷宫&走迷宫)
一本通在线崩溃....... . 有图有真相 这是个三维迷宫,其实和二位迷宫差不多,只是方向多加了2个. 但这个题的输入十分恶心,一度被坑的用cin.ignore(),但还是不过... 它的正确输入方 ...