Después de cargar el módulo laravel-vue-pagination, lo agregué a app.js e intenté usarlo. Pude importar el componente y exportarlo como accesorios sin ningún problema, pero usar el elemento me da este error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')También recibo un mensaje de Vetur en mi app.js al pasar el mouse.
Could not find a declaration file for module 'laravel-vue-pagination'. 'e:/Dev/repos/itgg-core/node_modules/laravel-vue-pagination/dist/laravel-vue-pagination.common.js' implicitly has an 'any' type. Try `npm i --save-dev @types/laravel-vue-pagination` if it exists or add a new declaration (.d.ts) file containing `declare module 'laravel-vue-pagination';`Vetur(7016)De acuerdo con esto , agregué un archivo laravel-vue-pagination.d.ts en la raíz de mi proyecto:
declare module 'laravel-vue-pagination' { }Sin embargo, esto no parece ayudar de ninguna manera.
aplicación.js:
require('./bootstrap'); // Import modules... import { createApp, h } from 'vue'; import { App as InertiaApp, plugin as InertiaPlugin } from '@inertiajs/inertia-vue3'; import { InertiaProgress } from '@inertiajs/progress'; const el = document.getElementById('app'); createApp({ render: () => h(InertiaApp, { initialPage: JSON.parse(el.dataset.page), resolveComponent: (name) => require(`./Pages/${name}`).default, }), }) .mixin({ methods: { route } }) .use(InertiaPlugin) .mount(el); InertiaProgress.init({ color: '#4B5563' }); require('chart.js'); require('laravel-vue-pagination');Supongo que algo anda mal con la solicitud o al cargar el módulo, pero no estoy seguro. Cualquier ayuda es muy apreciada.