Search code examples
laravelinertiajslaravel-jetstream

Suddenly getting "Target class [Inertia\Ssr\Gateway] does not exist." I don't use Inertia's SSR. How can I get back to a functioning site?


I've got a Laravel Jetstream project using Inertia. I've been running it for a while. Launched on Jetstream v1, later upgraded to v2. Everything has been running great. Today I was messing with some composer and npm stuff and suddenly every page is broken. I just get an error that looks like this:

Illuminate\Contracts\Container\BindingResolutionException Target class [Inertia\Ssr\Gateway] does not exist.

This happens on every view. I have never used Inertia's SSR, and I don't want to (at least not currently). I tried resetting both my composer json files and my npm json files but I cannot get back to my functioning site. I'm losing my mind. Any ideas of how I can get back to my original functioning site?


Solution

  • Try to remove vendor folder and node_modules. Then run

    composer install
    

    and :

    npm install
    

    After that try to run these commands:

    php artisan cache:clear
    
    php artisan view:clear
    
    php artisan route:clear
    
    composer dump-autoload