如何修复 Composer 错误:“无法扫描目录中的类"?

我正在尝试通过输入以下命令在终端中安装作曲家:

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:

[运行时异常]
无法扫描app/commands"中看起来既不是文件也不是文件夹的类

[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

相关文章