For what are you using @viteReactRefresh and @livewireStyles ?
In your head try to put @inertiaHead under @vite('resources/js/app.tsx')
@routes
@vite('resources/js/app.tsx')
@inertiaHead
I'm trying to deploy my test project for a company on Heroku. I had a bunch of problems with it, and I fixed them, but the current one still persists and there's nothing that helps me on the web.
My site works fine with localhost, but everything I get on the Heroku version is a white screen with @routes @livewireStyles @inertiaHead @inertia as the only text content on it. In the console, I get this stuff:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'dataset') at $E (app-DUYZ23nC.js:125:1381) at app-DUYZ23nC.js:125:1912
I tried adding @vite('resources/js/app.tsx') to the main blade view both in the header and body after @inertia / @inertiaHead, but nothing worked.
This is the blade file now:
<title inertia>{{ config('app.name', 'Laravel') }}</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
<!-- Scripts -->
@routes
@viteReactRefresh
@livewireStyles
@inertiaHead
@vite('resources/js/app.tsx')
</head>
<body class="font-sans antialiased">
@inertia
</body>
The previous errors I had are:
1.Mix manifest not found at: /app/public/mix-manifest.json
It was fixed by adding @vite('resources/js/app.tsx') to the blade file
2.Mixed content issue- Content must be served as HTTPS
Fixed by changing the .env APP_URL
Any suggestions how to fix the Inertia issue?
Please or to participate in this conversation.