[Solved] Unhandled promise rejection TypeError: "_this.$q.dialog is not a function"



  • I don’t know why I am getting this error (and no dialog showing), any suggestions?

    1. I have verified that I added the component 'Dialog" to the list in quasar.conf.js
    2. I am using this code to call it:
    this.$q.dialog({
                    title: 'Confirm',
                    message: 'There is a new version available. Your version will be updated.',
                    ok: 'Update'
                  }).then(() => {
                    window.location.reload(true)
                    this.$setItem('myapp_version', this.curVersion)
                  }).catch(() => {
                    alert('Houston...')
                  })
    

    Is there something wrong or missing? Why would I get that error? I am using latest Quasar ( CLI v0.17.15 and Framework v0.17.12)



  • UGH nevermind…I had accidentally added ‘Dialog’ to COMPONENTS list instead of PLUGINS list!