skip to Main Content

After run composer create-project laravel/laravel:^11.0 project-name then going to my project folder cd project-name after that i should run php artisan serve but i got an error at this step that seems vendor folder not found in my project

Please note: If i using laravel 8 it’s work fine but i need to use laravel 11

Help me, Thank!

My php version is 8.2.10

Try to using laravel 11 but can’t, On the other hand laravel 8 works find.
PLease note that I’am try to run composer install and composer update and remove composer cache

Full error message: "PHP Warning: require(/home/ahmedelmoslmany/Laravel-demo/example-app11/vendor/autoload.php): Failed to open stream: No such file or directory in /home/ahmedelmoslmany/Laravel-demo/example-app11/artisan on line 9
PHP Fatal error: Uncaught Error: Failed opening required ‘/home/ahmedelmoslmany/Laravel-demo/example-app11/vendor/autoload.php’ (include_path=’.:/usr/share/php’) in /home/ahmedelmoslmany/Laravel-demo/example-app11/artisan:9
Stack trace:
#0 {main}
thrown in /home/ahmedelmoslmany/Laravel-demo/example-app11/artisan on line 9"

2

Answers


  1. Chosen as BEST ANSWER

    When i run composer install after running composer create-project laravel/laravel example-app11 I paid attention to this warning message "Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled."

    I gave this message to chatgpt and followed him until I solved it. I don't know why that's happening but it's working now!


  2. The error:

    Fatal error: Uncaught Error: Failed opening required ‘/home/ahmedelmoslmany/Laravel-demo/example-app11/vendor/autoload.php’

    says the autoload.php file is missing. This file can be created using the command composer dump-autoload.

    If that does not run successfully you might need to run composer install first.

    I’ve tried this on a Laravel 11 project where the vendor folder has been deleted and the project can be served successfully after:

    $composer install
    ...
    $composer dump-autoload
    ...
    $php artisan serve
    
     INFO  Server running on [http://127.0.0.1:8000]. 
    

    If your project does not work after running these commands we’ll need more information to help fix it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search