Why “no such file or directory … autoload.php” when accessing Laravel app?

前端 未结 9 1313
梦毁少年i
梦毁少年i 2020-12-15 16:48

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:

相关标签:
9条回答
  • 2020-12-15 16:55

    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.

    0 讨论(0)
  • 2020-12-15 16:58

    I had same problem on Windows(Also works for Mac).

    Solution:

    1. Install composer
    2. Open cmd
    3. Navigate to your laravel application root
    4. Run composer install command in cmd

    Done!

    0 讨论(0)
  • 2020-12-15 16:58

    if you are migrating the project,try to delete composer.lock and then composer install .this worked for me!

    0 讨论(0)
  • 2020-12-15 16:59

    Your Laravel installer is giving an error.

    Do composer global require "laravel/installer"

    Then the new Laravel installer will be installed. Your new Laravel will not return an error then.

    0 讨论(0)
  • 2020-12-15 17:07

    To get around this problem, doing a composer self-update would do the trick. Moreover, as long as the composer command itself works in your command-line/bash (which means you have it in your PATH) you don't necessarily need to go the actual path where composer.phar resides in (i.e. c:/ProgramData/Composer/bin or whatsoever).

    0 讨论(0)
  • 2020-12-15 17:08

    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.

    0 讨论(0)
提交回复
热议问题