Error when calling some components



  • I did it this way and I continue without displaying the input and with the same error.

    Unknown custom element: <q-input> - did you register the component correctly? For recursive components, make sure to provide the “name” option.



  • Okay, it worked for me, so the error must be in another file.



  • @tonpereira you need to add this code in your contato.vue

    <script>
    import {
      QInput
    } from 'quasar'
    
    export default {
      components: {
        QInput
      },
      data () {
        return {
          text: ''
        }
      }
    }
    </script>
    


  • @rohityadav I think it it already there, see the pastebin and my correction.



  • @a47ae yes i agree you are correct and i appreciated as your response and helping to others .
    but missing { } es6 syntax for importing named export . So QInput should be in { }

    import {
      QInput
    } from 'quasar'
    
    


  • @rohityadav I already corrected this error in answer 9 🙂
    And as I stated, I think the error is in another file, cause with the corrected import it is working for me.



  • @tonpereira You are right, I didn’t notice the /. The self closing syntax should work just fine. Have you tried to isolate the issue by creating a minimalistic repo to reproduce the error? And you’re using quasar 0.14 beta & vue 2.3.x right?



  • Hi,

    I have the same problem, but I cant fix it globaly:
    Vue.use(Quasar, { components: All, directives: All })

    and error is
    ``
    vue.runtime.esm.js?a427:475 [Vue warn]: Unknown custom element: <q-input> - did you register the component correctly? For recursive components, make sure to provide the “name” option.

    found in

    —> <Index> at /projet/proto/quasar/src/components/Index.vue
    <App> at /projet/proto/quasar/src/App.vue
    <Root>
    ``

    I just :

    • quasar init default
    • add the import + components
    • add <q-input v-model="text" />

    So globally or localy, it doesnt work.
    Quasar : 13.1 / Vue 2.4.2

    Thx



  • OK, I found my mistack… I’m new with Quasar, and looking for a new UI framwork cause I’m not very satify with ElementUI.
    So, I migrate my app - BUT - I read the doc of the 0.14, And the default npm install use 0.13 :o) :o)

    So, I’m ready for the future 🙂



  • Thanks everyone for the help, I already found the error.

    I was really trying to use the documentation for a different version of the one that was installed.

    Thank you everyone for the attention!