Ɛɔıs3
Ɛɔıs3

Reputation: 7871

Lumen failed to open /../vendor/autoload.php

I started using Lumen upon its release in April.

From version 5.0, I already faced this same problem and found a solution (see here).

There are some days I proceeded to create a new project in Lumen (5.1). However, by applying the method with the .htaccess above, the problem doesn't solve it this time.

Here is the full error :

Warning: require_once(path_of_the_project/../vendor/autoload.php): failed to open stream: No such file or directory in path_of_the_project\bootstrap\app.php on line 3

Fatal error: require_once(): Failed opening required 'path_of_the_project\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in path_of_the_project\bootstrap\app.php on line 3

How to fix it?

Upvotes: 9

Views: 14566

Answers (2)

Vinoth
Vinoth

Reputation: 181

I got the same error and resolved it by running the below command from project root folder.

composer update -vvv

Upvotes: 12

krisanalfa
krisanalfa

Reputation: 6438

In your bootstrap/app.php file, change:

require_once __DIR__.'/../vendor/autoload.php';

Into:

require_once dirname(__DIR__).'/vendor/autoload.php'; 

And make sure you have ran composer update -vvv SUCCESSFULLY.

Upvotes: 12

Related Questions