It expects you to pass at least one parameter, but if you read the error message you see that it is a compiled view that complains, so try clearing the laravel cache.
Strange Vite error: Too few arguments to function Illuminate\Foundation\Vite::__invoke()
Hello, I started getting this error today, even though I changed pretty much nothing from yesterday, when it was working just fine. The full error is:
Too few arguments to function Illuminate\Foundation\Vite::__invoke(), 0 passed in <path>/storage/framework/views/e17f05ed3e1c5b918d987a69cc70f42fcac65fdf.php on line 8 and at least 1 expected
Pretty much the only change I did from yesterday was uninstalling Ziggy with composer and then I noticed that it broke. I undid all changes and it still doesn't work. I also noticed just this morning that Laravel moved to Vite and I got confused if I need to do any configurations with the laravel-vite plugin since I've already been using it and I've had Laravel 9.19 for a few days now with everything working...
When googling the error, I got some results regarding incorrect route parameters, but I don't think there's any room for error on my part here - the project is fresh and I only have the following as a route. Also maybe worth noting that at the moment the editor marks the function inertia as undefined, even though it didn't yesterday...
Route::get('/', function () { return inertia('AppHome'); });
What is happening !? My stack is Laravel 9.19, Inertia, Vite, Vue
Please or to participate in this conversation.