trouble with quasar dev and quasar build run on 0.16.1



  • Hi, receiving strange error after run dev and build. With quasar build or dev I receiving following trace:

    ERROR in ./src/App.vue?vue&type=template&id=491840de (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=template&id=491840de)
    Module build failed: Error: No parser and no file path given, couldn’t infer a parser.

    @ ./src/App.vue?vue&type=template&id=491840de 1:0-194 1:0-194
    @ ./src/App.vue
    @ ./.quasar/entry.js

    Found something similar with eslint loader and webpack > 4. but trying to except eslint in webpack-config.js also not helped.

    Could somebody check and help to resolve the issue?

    Thank you
    Arman


  • Admin

    Hi,

    One thing to note: this is not a problem caused by Quasar.

    Seems like a package called prettier has caused a regression in their latest release, which is affecting package @vue/component-compiler-utils.

    Possible fixes until prettier maintainers release a new version:

    1. If you are using NPM, then first try to delete node_modules AND package-lock.json, then npm install again. If this doesn’t works, then:
    npm install --save-dev prettier@1.12.0
    npm run dev
    
    1. If you’re using Yarn add this to your package.json to force @vue/component-compiler-utils to use the right version:

    “resolutions”: {
    "@vue/component-compiler-utils/prettier": “1.12.1”
    }
    Then do a fresh install.


    References:



  • Just to let you all know, this has been resolved upstream and 0.16.2 will include the fixed vue libs.



  • thank you. Additionally when I got another error related to dependency, I removed /node_modules and run npm install once more helped. Now everything fine. Thank you once more