How to fix Composer error: "could not scan for classes inside dir"?
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 runcomposer install
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 updateartisan 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.
I had the same problem. In my case, I noticed that there was no app/commands folder in my laravel install. I created the commands folder and composer dump-autoload was working again!