创建vue项目错误 Error: No parser and no file path given, couldn't infer a parser

原因是prettier 更新到1.13.1导致的
component-compiler-utils 1.3.1 已经更新修复了.

现在不需要把1.13.1 降级了

具体, https://github.com/vuejs/comp...

error
in ./src/App.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.

at normalize (F:\WebStormProjects\a9043-blog-mobile\node_modules\prettier\index.js:7051:13)
at formatWithCursor (F:\WebStormProjects\a9043-blog-mobile\node_modules\prettier\index.js:10370:12)
at F:\WebStormProjects\a9043-blog-mobile\node_modules\prettier\index.js:31115:15
at Object.format (F:\WebStormProjects\a9043-blog-mobile\node_modules\prettier\index.js:31134:12)
at Object.module.exports (F:\WebStormProjects\a9043-blog-mobile\node_modules\vue-loader\lib\template-compiler\index.js:80:23)
解决办法

npm install --save-dev [email protected]

npm run dev


猜你喜欢

转载自blog.csdn.net/tiguer/article/details/80481778