Luiz
Luiz

Reputation: 2539

Accidentally removed vendor folder in laravel project

I was working with a laravel project and, accidentally, removed vendor folder.

What should I do? Create a new project and copy it or download it anywhere else?

I had no additional composer dependencies installed.

Upvotes: 12

Views: 14165

Answers (3)

Joes5
Joes5

Reputation: 31

If you're using Laravel 10 and sail commands, sail will stop working after removing the vendors folder.

You can fix by making sure your project is up:

docker-compose up -d 

and entering the container with:

docker exec -it  <<projectname>>-laravel.test-1 bash

Then running composer again:

composer install

Upvotes: 2

Dmitry Malyshenko
Dmitry Malyshenko

Reputation: 3051

Just run composer install after cding into the Laravel project's directory.

Upvotes: 22

mrios16
mrios16

Reputation: 64

The Vendor folder is created by running composer install. It contains only the packages which you have asked composer to track in the composer.json file. If you have a composer.phar file in the root of your application run php composer.phar install.

https://getcomposer.org/doc/00-intro.md is probably your best source for additional information.

Upvotes: 3

Related Questions