Search code examples
phplaravellaravel-nova

Why its showing class not found errors?


I just cloned a git repo and ran the necessary commands to install the project.

When I access the login page "http://localhost:80/nova/login" it works. However after enter the correct credentials and submit it shows an error:

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class '\App\User' not found

Do you know what can be the issue?

Also running this command:

/var/www # php artisan component:update

It shows a similar error:

Starting Update of All Component files

   Symfony\Component\Debug\Exception\FatalThrowableError  : Class 'App\Component' not found

Solution

  • After cloning, running through these steps should fix your problem:

    • run composer install or npm install.
    • check that the .env file is correct.
    • run php artisan key:generate
    • Optional: php artisan migrate
    • run php artisan serve