Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sepolly's avatar

Inertia view not showing in the browser

I am trying to use inertia to glue both my Laravel and Vue app. I presume I have set up everything correctly (no error is shown). my app.blade.php file looks like this:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
      @vite(['resources/js/app.js','resources/css/app.css'])
      @inertiaHead
  </head>
  <body>
    @routes
    @inertia
  </body>
</html>

I am using ziggy vue which I have already set up. My app.js file looks like this:


import { createApp, h } from 'vue'
import { createInertiaApp } from '@inertiajs/vue3'
import { ZiggyVue,route } from 'ziggy-js'

createInertiaApp({
    resolve: name => {
        const pages = import.meta.glob('./Pages/**/*.vue', { eager: true })
        return pages[`./Pages/${name}.vue`]
    },
    setup({ el, App, props, plugin }) {

        const app = createApp({ render: () => h(App, props) })
        app.config.globalProperties.$route = route
        app
            .use(plugin)
            .use(ZiggyVue)
            .mount(el)
    },
})

For some reason I don't know, the page is not displaying in the browser. Please I need someone to help me.

0 likes
5 replies
tykus's avatar

@sepolly when you say

the page is not displaying in the browser

what do you see in the browser / DevTools?

tykus's avatar

@Sepolly did you check the Console in your browser's devtools?

Also, are you running npm run dev?

Sepolly's avatar

@tykus Yes.I am running npm run dev. I also checked the console

Sepolly's avatar

Also found this error in the console

Uncaught SyntaxError: The requested module 'http://[::1]:5173/node_modules/.vite/deps/vue.js?v=b7d5a4ed' doesn't provide an export named: 'default'

Please or to participate in this conversation.