Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' 未找到
Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found
我目前正在使用 L5.5 并在那里生成 api 文档 我已经安装了 this 包,现在我不需要那个包 我决定卸载它但是在卸载时我收到这个错误。
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
我检查了 repo 的问题和网上,但没有得到满意的答案。
我按照以下步骤卸载了这个 repo
从 composer.json
中删除 repo 然后我 运行 命令 composer update
.
知道它为什么会出现以及如何解决这个错误吗?
感谢您的努力:)
我已经删除了提到的文件,但我仍然收到此错误
转到 config/app.php
并确保您删除了
Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class
由此而来。现在 运行:
php artisan clear-compiled
和
php artisan config:clear
以确保您没有使用任何缓存。之后应该不会有任何问题
注意
如果您在此之后仍然遇到此问题,请转到 bootstrap/cache/config.php
,正如 Marcin Nabiałek 在评论中提到的那样,并在其中从 providers
的数组中删除 Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class
之后重新运行以上三个命令。
我目前正在使用 L5.5 并在那里生成 api 文档 我已经安装了 this 包,现在我不需要那个包 我决定卸载它但是在卸载时我收到这个错误。
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
我检查了 repo 的问题和网上,但没有得到满意的答案。
我按照以下步骤卸载了这个 repo
从 composer.json
中删除 repo 然后我 运行 命令 composer update
.
知道它为什么会出现以及如何解决这个错误吗?
感谢您的努力:)
我已经删除了提到的文件,但我仍然收到此错误
转到 config/app.php
并确保您删除了
Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class
由此而来。现在 运行:
php artisan clear-compiled
和
php artisan config:clear
以确保您没有使用任何缓存。之后应该不会有任何问题
注意
如果您在此之后仍然遇到此问题,请转到 bootstrap/cache/config.php
,正如 Marcin Nabiałek 在评论中提到的那样,并在其中从 providers
的数组中删除 Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class
之后重新运行以上三个命令。