【laravel】Could not scan for classes inside "~~" which does not appear to b e a file nor a folder の対処法

Laravelphp
【laravel】Could not scan for classes inside "~~" which does not appear to b   e a file nor a folder の対処法

composerを再インストールしたくて

composer install

を実行するときに

Could not scan for classes inside "/var/www/moriyama-svrapi/vendor/phpunit/phpunit/src/" which does not appear to b
e a file nor a folder

上記のエラーがでたのでその対策法について書きます。

結論

キャッシュを消す

rm -Rf vendor/
rm composer.lock
composer clear-cache
composer install

上記コマンドを叩いて
キャッシュをクリアしてみてください

この記事をシェアする