Why "no such file or directory ... autoload.php" when accessing Laravel app?
Solution 1
Did you install Laravel's dependencies? When you unzip the framework in your work environment (i.g. htdocs) you must install the necesary dependencies with the command php composer.phar install
(assuming you have installed composer and git). When that is done, you will be able to see the home page of the framework.
Solution 2
I had same problem on Windows(Also works for Mac).
Solution:
- Install composer
- Open cmd
- Navigate to your laravel application root
- Run
composer install
command in cmd
Done!
Solution 3
This message occurs for Laravel's dependencies.
If never run composer install
in your project then run this command on the terminal.
Else run composer update --no-scripts
. All Laravel dependencies will download.
Admin
Updated on September 06, 2020Comments
-
Admin over 3 years
I am a newbie to Laravel, have been trying to install Laravel, wasted three hours unfortunately didn't work. When I access through public directory, I get these errors:
Warning: require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload.php on line 17 Call Stack
And the following:
Fatal error: require(): Failed opening required 'C:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C