Class 'Illuminate\Foundation\Application' not found Laravel

扶醉桌前 提交于 2019-12-19 11:52:41

问题


I installed via composer the Guzzle and i received this error,

> @php artisan package:discover
PHP Fatal error:  Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php:14
Stack trace:
#0 /home/vagrant/PROJ/memo/laravel_project/artisan(20): require_once()
#1 {main}
  thrown in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php on line 14

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php:14
Stack trace:
#0 /home/vagrant/PROJ/memo/laravel_project/artisan(20): require_once()
#1 {main}
  thrown in /home/vagrant/PROJ/memo/laravel_project/bootstrap/app.php on line 14
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

this was working before, and now i checked the DIR path and it's all ok. I also tried composer dump-autoload, composer update, removing composer.lock and vendor, composer install


回答1:


Delete vendor folder and composer.lock.

After that

composer install

then

composer update --no-scripts

Try this, this will solve your error. Note: Please make sure you have all packages in composer.json.



来源:https://stackoverflow.com/questions/48199082/class-illuminate-foundation-application-not-found-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!