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

前端 未结 16 1353
梦毁少年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:30

    @Bashir almost helped me but I needed:

    composer update --no-scripts
    

    I found the answer here: https://laracasts.com/discuss/channels/general-discussion/fatal-error-class-illuminatefoundationapplication-not-found-in-pathtoprojectbootstrapappphp-on-line-14?page=0

    0 讨论(0)
  • Change the auto_prepend_file property on php.ini

    ; Automatically add files before PHP document. 
    ;http://php.net/auto-prepend-file 
    auto_prepend_file =
    
    0 讨论(0)
  • 2020-11-29 18:35

    First, review route inside index.php

    require __DIR__.'/../vendor/autoload.php';
    
    $app = require_once __DIR__.'/../bootstrap/app.php';
    

    in my case the route did not work, I had to review the directories.

    0 讨论(0)
  • 2020-11-29 18:36

    I was able to resolve by removing composer and reinstalling the proper way. Here is what I did:

    • sudo apt remove composer
    • sudo apt autoclean && sudo apt autoremove
    • Installed globally with the instructions from: https://getcomposer.org/doc/00-intro.md Download from: https://getcomposer.org/installer global install: mv composer.phar /usr/local/bin/composer (Note: I had to move mine to mv composer.phar /usr/bin/composer)

    I was then able to get composer install to work again. Found my answer at the bottom of this issue: https://github.com/composer/composer/issues/5510

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