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
When i run
composer install
after runningcomposer 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!
The error:
says the
autoload.php
file is missing. This file can be created using the commandcomposer 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:If your project does not work after running these commands we’ll need more information to help fix it.