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 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 [email protected]~1.12.0

重新运行:

npm run dev

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

原文地址:https://www.cnblogs.com/tw6668/p/9099647.html

时间: 2024-10-25 04:02:23

vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.的相关文章

【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 Und

vue报错 Module not found: Error: Cannot resolve 'file' or 'directory'

炸了,我好写sell而组件,直接就用了,我的天哪 看你的写了吗,就用: Module not found: Error: Cannot resolve 'file' or 'directory' 页另一种错误,按这种情况我没遇到:http://www.mamicode.com/info-detail-1564042.html vue报错 Module not found: Error: Cannot resolve 'file' or 'directory'

Vue.js报错Failed to resolve filter问题原因

Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错误. console控制台调试的时候 提示错误消息: Failed to resolve filter: HomePage console错误信息.jpg 我原来的写法: 原来的错误写法.jpg 错误原因 经过自己的摸索,后来发现竟然是代码顺序错误问题... 由于先执行的pageList,后执行的V

Module build failed: Error: Cannot find module 'node-sass’解决

在 npm run dev 时出现 ” Module build failed: Error: Cannot find module 'node-sass’ “ 这样的错误,如下: ERROR Failed to compile with 1 errors 19:51:09 error in ./src/page/Class/ClassList.vue Module build failed: Error: Cannot find module 'node-sass' Require stack

使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"

PHPMailer项目地址:https://github.com/PHPMailer/PHPMailer 项目中用到PHPMailer,使用过程中报错:"Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:" 由于我用的第三方smtp是ssl链接,所以需要再添加一些参数: $mail->SMTPOptions =

针对Flex+Java使用RemoteObject通讯 报错Channel.Connect.Failed error NetConnection.Call.Failed 404

今天在Flex中使用RemoteObject进行java调用时,报错 [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/UnitCi

移动vue项目,启动错误:Module build failed: Error: No PostCSS Config found in:

解决办法:在根目录新建postcss.config.js module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 version'} } } 然后再次启动项目即可解决 原文地址:https://www.cnblogs.com/johnjackson/p/10783075.html

Module build failed: Error: No PostCSS Config found

使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们把需要的东西都装在好运行项目的时候,有时会出现这样的错误: 这是因为缺少了一个配置文件,postcss.config.js,配置内容如下 module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 version'} } } 注意:这个文件是放在项目的根目录下的 原文地址:https://www.cnblogs.com/caoxueying2018

vue项目报错

webpack打包时出现 Error: ENOENT: no such file or directory, scandir Module build failed: Error: ENOENT: no such file or directory, scandir 'E:\lpp_vue\ScRM-admin\SCRM-Adm in-Web\node_modules\node-sass\vendor' 问题 :node-sass编译失败 解决方案是执行以下方法: npm rebuild nod