Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示
Posted Yan82
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示相关的知识,希望对你有一定的参考价值。
在创建一个vue项目启动时报错,报错的内容为:
error in ./src/App.vue
Module build failed: Error: No parser and no file path given, couldn’t infer a p
arser.
at UndefinedParserError.Wrapper (D:\dyyc\bookstore\[email protected]
[email protected]\index.js:1948:14)
at new UndefinedParserError (D:\dyyc\bookstore\[email protected]
@prettier\index.js:2055:83)
at normalize (D:\dyyc\bookstore\[email protected]@prettier\index
.js:7051:13)
at formatWithCursor (D:\dyyc\bookstore\[email protected]@prettie
r\index.js:10370:12)
at D:\dyyc\bookstore\[email protected]@prettier\index.js:31115:1
5
at Object.format (D:\dyyc\bookstore\[email protected]@prettier\i
ndex.js:31134:12)
at Object.module.exports (D:\dyyc\bookstore\[email protected]@
vue-loader\lib\template-compiler\index.js:80:23)
@ ./src/App.vue 11:0-392
@ ./src/main.js
@ multi ./node_modules/[email protected]@webpack-dev-server/client?htt
p://localhost:8082 webpack/hot/dev-server ./src/main.js
原因是prettier 更新到1.13.1导致的,component-compiler-utils 1.3.1 已经更新修复了.
【解决方法】:
1、node_modules下面的[email protected]@prettier文件夹删除
2、控制台安装 cnpm install --save-dev [email protected]
3、控制台运行 cnpm run dev
以上是关于Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示的主要内容,如果未能解决你的问题,请参考以下文章
配置webpack loader vue 报错:Module build failed: TypeError: this._init is not a function
VUE:安装npm install报错Module build failed: Error: ENOENT: no such file or directory, scandir
Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示
vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.(
VUE 打包 Module build failed: Error: No PostCSS Config found in
Module build failed: Error: Cannot find module ‘node-sass‘ Require stack报错解决