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

我正在尝试通过输入以下命令在终端中安装 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:

[运行时异常]
无法扫描应用程序/命令"中的类,该类既不是文件也不是文件夹

[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?

推荐答案

通常当您有一些损坏的文件或任何 Composer 更新崩溃或中断时,就会发生这种情况.

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

要解决,只需删除供应商文件夹并运行composer 安装

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

相关文章