#Wrong page being loaded in fresh install

4 messages · Page 1 of 1 (latest)

dull chasm
#

I'm using breeze, react, and vite on a fresh install. When navigating to the root page "site.dev", it's looking for Pages/Home.jsx rather than the Welcome page defined in the route.

At a loss here for why this is occurring.

marble surge
#

Probably because you're trying to render Inertia::render('Home')? Or maybe you haven't rebuilt your assets?

dull chasm
#

I've run npm run build prior to npm run dev. I haven't changed anything beyond things in the .env for db setup. Which is weird that it's looking for a page that doesn't exist.

The routes file is still:

<?php

use App\Http\Controllers\ProfileController;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

Route::get('/', function () {
    return Inertia::render('Welcome', [
        'canLogin' => Route::has('login'),
        'canRegister' => Route::has('register'),
        'laravelVersion' => Application::VERSION,
        'phpVersion' => PHP_VERSION,
    ]);
});

Route::get('/dashboard', function () {
    return Inertia::render('Dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');

Route::middleware('auth')->group(function () {
    Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
    Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
    Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});

require __DIR__.'/auth.php';
marble surge
#

I guess search for Home within your project?