require(vendor/autoload.php): failed to open stream

前端 未结 16 1454
梦毁少年i
梦毁少年i 2020-11-29 18:02

I know that this issue has been posted many times, but for me it seems to be a different problem.

Indeed, this error

Warning: require(vendor/autol

16条回答
  •  我在风中等你
    2020-11-29 18:27

    In your project folder, the vendor folder is missing so you got this error:

    Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in

    When you download the project through git, the project is downloaded without the vendor folder

    You need /vendor because all your packages are there, including all the classes Laravel uses. The vendor directory contains your Composer dependencies.

    The solution is simple, Just run this command:

    composer update --no-scripts 
    composer update
    
    • composer update --no-scripts It will Skips execution of scripts defined in composer.json file.
    • composer update It will update your depencencies as they are specified in composer.json file.

    With this command, you will re-create the vendor folder in your project and after that your project will start working normally.

提交回复
热议问题