Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Composer error: "could not scan for classes inside dir"?

I'm trying to install composer in terminal by entering this command:

php composer.phar install 

it starts to install required packages but I'm getting this error type:

[RuntimeException]
Could not scan for classes inside "app/commands" which does not appear to be a file nor a folder

How can I overcome this issue?

like image 310
user3026894 Avatar asked Dec 15 '13 14:12

user3026894


2 Answers

Usually this happens when you have some corrupted files or any composer update has crashed or interrupted.

To solve, just delete the vendor folders and run composer install

like image 151
albanx Avatar answered Sep 19 '22 21:09

albanx


When you install Laravel it creates a

app/commands 

folder. Looks like it's not there. Just create it or remove from composer.json:

"classmap": [     "app/commands",  /// <--- this line ], 

And run

composer update artisan dump-autoload 

The last one is similar to composer dump-autoload, but it does some Laravel stuff too.

If you don't have any commands you don't really need it. If you plan to create artisan commands, create that folder and it should work.

like image 25
Antonio Carlos Ribeiro Avatar answered Sep 17 '22 21:09

Antonio Carlos Ribeiro