Upgrade Inertiajs breaks my code
I followed the upgrade guide to v.1.0 https://inertiajs.com/upgrade-guide
now I get the error
Invalid vnode type when creating vnode: undefined.
at <App>
Try showing your app.js file
App.js file
import './bootstrap';
import '../css/app.css';
import { createApp, h } from 'vue';
import { createInertiaApp, Link } from '@inertiajs/vue3'
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import DefaultLayoutFile from './Layouts/Default.vue'
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
createInertiaApp({
title: (title) => `${title} - ${appName}`,
resolve: (name) => {
const page = resolvePageComponent(
`./Pages/${name}.vue`,
import.meta.glob("./Pages/**/*.vue")
);
page.then((module) => {
module.default.layout = module.default.layout || DefaultLayoutFile;
});
return page;
},
setup({ el, app, props, plugin }) {
return createApp({ render: () => h(app, props) })
.use(plugin)
.component('Link', Link)
.use(ZiggyVue, Ziggy)
.mount(el);
},
});
Hmm. Programming sucks at times. thanks @sinnbeck
@successdav no worries :) just upgraded earlier this week so it was fresh in my mind
Please or to participate in this conversation.