[Solved] Vue.js error: 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

Ways to resolve consciousness:

npm i [email protected]~ 1.12 . 0

Re-run:

npm run dev

 


Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *