Error after updating v14 to v16



  • I have an existing v16 project working fine, but I just updated an older project and haven’t been able to figure out what my problem is. Here’s what I did:

    1. Updated the cli to latest, globally and locally.
    2. Started a fresh project with quasar init.
    3. Copied my files over and changed everything I needed to (at least I thought so).
    4. Ran quasar dev and get the following error for every module:
    
    ERROR in ./src/components/builder/choices.vue?vue&type=template&id=1dd6811e (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/builder/choices.vue?vue&type=template&id=1dd6811e)
    Module build failed:   Error: No parser and no file path given, couldn't infer a parser.
    
      - index.js:7051 normalize
        [ramify]/[prettier]/index.js:7051:13
    
      - index.js:10370 formatWithCursor
        [ramify]/[prettier]/index.js:10370:12
    
      - index.js:31115
        [ramify]/[prettier]/index.js:31115:15
    
      - index.js:31134 Object.format
        [ramify]/[prettier]/index.js:31134:12
    
      - compileTemplate.js:93 actuallyCompile
        [ramify]/[@vue]/component-compiler-utils/dist/compileTemplate.js:93:29
    
      - compileTemplate.js:26 compileTemplate
        [ramify]/[@vue]/component-compiler-utils/dist/compileTemplate.js:26:16
    
      - templateLoader.js:42 Object.module.exports
        [ramify]/[vue-loader]/lib/loaders/templateLoader.js:42:20
    
     @ ./src/components/builder/choices.vue?vue&type=template&id=1dd6811e 1:0-210 1:0-210
     @ ./src/components/builder/choices.vue
     @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/builder/scene.vue?vue&type=script&lang=js
     @ ./src/components/builder/scene.vue?vue&type=script&lang=js
     @ ./src/components/builder/scene.vue
     @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/builder.vue?vue&type=script&lang=js
     @ ./src/pages/builder.vue?vue&type=script&lang=js
     @ ./src/pages/builder.vue
     @ ./src/router/routes.js
     @ ./src/router/index.js
     @ ./.quasar/entry.js
     @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 webpack/hot/dev-server ./.quasar/entry.js
    Child html-webpack-plugin for "index.html":
                                       Asset      Size  Chunks  Chunk Names
                                  index.html  1.38 MiB       1
        061a3c3e0d3586b7fb7b.hot-update.json  44 bytes
        Entrypoint undefined = index.html
        [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.template.html] 1.42 KiB {1}
        [./node_modules/lodash/lodash.js] 527 KiB {1}
        [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {1}
        [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {1}
    
    

    If someone could even point me in the right direction, maybe I could figure it out from there. I have used Quasar a good bit, but I don’t know much about webpack.

    Thanks.



  • Also, I did try removing node_modules and reinstalling, just in case, but nothing changed.



  • @pmooredesigner yes similar error, just posted the error



  • 14 > 15 has MANY breaking changes, such as the introduction of quasar.conf.js. Please consult https://quasar-framework.org/guide/quasar-upgrade-guide.html



  • I’m aware of those changes, which is why I started a fresh project.


  • 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:



  • I’m using NPM, and the provided fix ‘npm install --save-dev prettier@1.12.0’ worked for me. Thank you for your time!


  • Admin

    Just to let you all know, this has been resolved upstream and 0.16.2 includes the recently updated vue libs with the fix for this. So if you manually installed prettier, remove it.