AFTER UPDATE: [Vue warn]: Failed to mount component: template or render function not defined.



  • I just updated to the latest quasar 0.14.5, created a new template with quasar cli, and moved my component files into it and resolved all missing dependencies. But now when I launch quasar dev. I get the following warning:

    [Vue warn]: Failed to mount component: template or render function not defined.

    Googling around, it seemed like this was related to runtime vue vs compiler + runtime, so following some instructions I changed a line in my main.js file from:

    import Vue from 'vue'

    to

    import Vue from 'vue/dist/vue.js'

    But alas I get the exact same error. When I try quasar build, the resulting list folder contents WILL properly load on my website, so I feel certain this error is related to quasar dev only…does anyone have any help or advice on what else I can try to fix this? I can’t do local development until I can get my hot reloading local dev environment working again. Thanks!



  • For anyone else with this issue, I found the reason. Since I replaced the src folder entirely, I missed the fact that due to changes in vue-loader (https://github.com/vuejs/vue-loader/releases/tag/v13.0.0), the main quasar start was being called differently. Once I replaced:

    Quasar.start(() => {
      /* eslint-disable no-new */
      new Vue({
        el: '#q-app',
        router,
        render: h => h(require('./App'))
      })
    })
    

    with

    Quasar.start(() => {
      /* eslint-disable no-new */
      new Vue({
        el: '#q-app',
        router,
        render: h => h(require('./App').default)
      })
    })
    

    Everything started working again.



  • Legend!!


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.