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?
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
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!
When you install Laravel it creates a
folder. Looks like it's not there. Just create it or remove from composer.json:
And run
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 am
Xampp
user onWindows 10
. I try all of the above methods but none of them work for me. I fixed my problem with this method, and Hopefully, it will help others.;C:\bin
to your PATH environment variable (related help)C:\bin\phpunit.phar
Windows+R
» typecmd
» ENTER)Create a wrapping batch script (results in
C:\bin\phpunit.cmd
):Open a new command line and confirm that you can execute PHPUnit from any path:
This method solves my problem. Hope It will save your day too.
My problem was that I've had
App
instead ofapp
in my directory path. Maybe this will help someone.I had the same issue. For me it happened after I deleted a class dir and forgot to update composer.json.
The fix was simply updating the classmap array in composer.json