I using ubontu 20.04. My team membe create a laravel project on Windows 10. I tring to clone this project from GitHub. after cloning repository. When I run composer update
I got error. PHP Fatal error: Uncaught ReflectionException: Class App\Console\Kernel does not exist. Not only that I also run this command php artisan --version
unfortunately. I got same error again.
I tring many to ways to selve this problem such as:
Way-1 In composer.json change:
"psr-4": {
"App\\": "myforms/app/"
}
to:
"psr-4": {
"App\\": "app/"
}
On the server, in my source directory, run composer update
then composer dump-autoload
Result:- My composer.json "App\": "app/"
Way-2
Check if console/kernel.php
is inside of app
-folder, if not it might be inside of my laravelApp.
If so, move console/kernel.php
to app
-folder.
Result:- Yes App/Console/Kernel.php is exist
Way-3 In my case composer.json was missing propper bracket closing "{ }" and line with "psr-4" was in wrong json segment.
- Check composer.json for proper align of "psr-4" it should be child of "autoload" section.
- Remove vendor
- composer install
Result:- I did but error was same
CodePudding user response: