0

I'm working on a codebase I inherited, after pulling the code from github and some minor changes I am able to get it to build and run using composer install using php artisan serve. However upon doing that when debug is enabled in my .env file I see the error Uncaught ReflectionException: Class config does not exist in .../vendor/laravel/framework/src/Illuminate/Container/Container.php:809

I've searched online and seen many troubleshoot this problem however none of the proposed solutions have worked for me. I've tried:

  1. deleting the vendors folder and re-running composer install
  2. deleting the boostrap/cache
  3. composer update

If in the .env file I set APP_DEBUG=false the app runs but only loads a 404 page. Appreciate any suggests or help.Other useful details

php version: 7.3.33

composer version: 2.7.7

laravel version: 7.30.6

5

1 Answer 1

0

Check config/app.php for missing or incorrect service providers. Also, ensure APP_KEY is set in .env.

If it still doesn't work, try:

php artisan config:clear
php artisan cache:clear
composer dump-autoload

That should resolve the ReflectionException.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.