0

I am working on a Laravel Lumen project. I am trying to spin up the existing project locally. First I installed the composer by running, "composer install". When I run the migration command, "php artisan migrate", I am getting the following error.

Fatal error: Uncaught Error: Class 'Laravel\Lumen\Bootstrap\LoadEnvironmentVariables' not found in /var/www/bootstrap/app.php:5
Stack trace:
#0 /var/www/artisan(18): require()
#1 {main}
  thrown in /var/www/bootstrap/app.php on line 5

I tried deleting the vendor folder and running composer install again. It did not work. The class does not seem to exist either. But the composer was installed successfully. I am using Lumen version 7.0. What is wrong with it and how can I fix it?

Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372

1 Answers1

0

Make sure you actually require the lumen package i.e. make sure your composer.json contains:

"require": {
   "php": "^7.2.5",
   "laravel/lumen-framework": "^7.0"
},

Afterwards run composer install again. If it worked then a folder /vendor/laravel/lumen-framework should be present

Johan van den Broek
  • 384
  • 2
  • 5
  • 18