I installed a global component in @ionic-vue, but when using it in another component I get the following error:
[Vue warn]: Failed to resolve component: VuePhoneNumberInput at <Registro ref=Ref< undefined > key="/registro" isInOutlet=true ... > at at at runtime-core.esm-bundler.js:38
[Vue warn]: Failed to resolve
component: VuePhoneNumberInput at <Registro ref=Ref< Proxy { : {…}, : {…} }
key="/registro" isInOutlet=true ... > at at at
My global register:
import VuePhoneNumberInput from 'vue-phone-number-input';
import 'vue-phone-number-input/dist/vue-phone-number-input.css';
import './theme/variables.css';
const app = createApp(App)
.use(IonicVue)
.use(router);
app.component('vue-phone-number-input', VuePhoneNumberInput);
Other component:
<template>
<ion-page>
<Navigacion :titulo="titulo">
<template v-slot:default>
<div class="titulo-login">Ingresa a Jamuy con tu número de celular</div>
<VuePhoneNumberInput v-model="numero" @update="resultados = $event"></VuePhoneNumberInput>
</template>
</Navigacion>
</ion-page>
</template>