mostafa-jamali
mostafa-jamali

Reputation: 129

PHP Fatal error:Uncaught Error: Failed opening required 'new-project/vendor/autoload.php' (include_path='.;C:\php\pear') in E:\new-project\artisan:18

I want to create new laravel project by composer. I use composer create-project laravel/laravel new-project command for create new project. then, my project is created following this picture.

enter image description here

I start Laravel's local development server using the Laravel's Artisan CLI serve command (first cd new-project and then php artisan serve command). But I got the following error.

enter image description here

Why is there no vendor folder in this project?!!!
How do I fix this error?

(I used PHP 8.1.10)

Upvotes: 3

Views: 28231

Answers (2)

David Armel Yao
David Armel Yao

Reputation: 23

You need to delete the vendor folder if you already have one in your project, and run composer install. Then restart your server.

Upvotes: 1

Aranya Sen
Aranya Sen

Reputation: 1094

You need to issue composer install to install packages which creates the vendor/ folder

Upvotes: 8

Related Questions