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

I started using Lumen after its release in April.

From version 5.0, I already ran into the same problem and found a solution ( see here ).

A few days later I started creating a new project in Lumen (5.1). However, applying method c .htaccessabove, the problem this time does not solve it.

Here is the complete error:

Warning: require_once ( path_of_the_project/../vendor/autoload.php): could not open stream: there is no such file or directory path_of_the_project\bootstrap\app.phpin line 3

Fatal error: require_once (): Could not open window " path_of_the_project\bootstrap/../vendor/autoload.php" (include_path = '; C: \ php \ pear') path_of_the_project\bootstrap\app.phpin line 3

How to fix it?

+4
source share
2 answers

In your file, bootstrap/app.phpchange:

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

IN:

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

And make sure you complete composer update -vvv SUCCESSFULLY .

+7
source

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

composer update -vvv
+2
source

Source: https://habr.com/ru/post/1607446/


All Articles