Vue3/Inertia Failed to resolve component Vue3/Inertia Failed to resolve component vue.js vue.js

Vue3/Inertia Failed to resolve component


The problem why I got this error was because I was mounting the app before I registered the components. This resulted in the components being shown in my application but still getting the warning that the component couldn't be found. By importing the components before the mount this problem was solved.

I previously imported the components this way:

    createInertiaApp({      resolve: (name) => import(`./Pages/${name}`),      setup ({ el, app, props, plugin }) {        const vueApp = createApp({ render: () => h(app, props) });            /**         * Mixin for showing notifications.         */        vueApp.mixin({          data: function () {            return {};          },          computed: {            pageNotifications () {              return this.$page.props.notification;            }          }        });            vueApp.use(plugin).mount(el);        registerGlobalComponents(vueApp);      }    });

And changed the order of calling plugin, registerGlobalComponents and the mount of the app like this:

vueApp.use(plugin);registerGlobalComponents(vueApp);vueApp.mount(el);

I was able to fix this problem thanks to Robert from the official Inertia Discord. If he wants to claim the bounty I will definitely award him the points.