mentamarindo
mentamarindo

Reputation: 647

Laravel/Lumen Class Not Found: LoadEnvironmentVariables

I've made a fresh Laravel/Lumen install with composer but when a try to run it throws this error:

Fatal error: Uncaught Error: Class 'Laravel\Lumen\Bootstrap\LoadEnvironmentVariables' not found in C:\xampp\htdocs\lumen\bootstrap\app.php:5

so I try to find the LoadEnvironmentVariables class in all the Lumen files but it only appear in the app.php itselft, how can I solve it?

Upvotes: 0

Views: 4184

Answers (3)

mentamarindo
mentamarindo

Reputation: 647

My solution was to use regular Laravel instead of Lumen.

btw Taylor Otwell (Laravel's creator) recommends no using Lumen anymore

source:

https://twitter.com/taylorotwell/status/1441101127496323080 https://twitter.com/taylorotwell/status/1212832185830510592 https://twitter.com/taylorotwell/status/1212833250483277824

Upvotes: 1

Ascanio Orlandini
Ascanio Orlandini

Reputation: 23

After struggling half a day, I found that an error_log in vendor/autoload.php did not appear.

The problem was solved by restarting Apache! Some cache somehow prevented the new autoload.php to be imported.

I hope this can help and save time to somebody else.

Upvotes: 0

mikhsanh55
mikhsanh55

Reputation: 21

I've facing the same issue, in my case when finish update my Lumen to the server, i'am replacing my .env app and then the Error is appear. The solution that work for me is to re-install dependncies using this command:

composer install

Upvotes: 2

Related Questions