Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found

Viewed 1720

I am currently working on L5.5 and there for generating api docs I have installed this package, now I don't need that package I decided to uninstall it but while doing uninstalling I got this error.

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

I checked on repo's issue and on net but haven't got satisfying answer.

I uninstalled this repo by doing following this

remove repo from composer.json and then I ran the command composer update.

Any idea why it is appearing and how to fix this error??

Thank you for your efforts :)

I have removed the mentioned file still I am getting this error Image

1 Answers

Go to config/app.php and make sure you removed

Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class

from this. Now run:

php artisan clear-compiled

and

php artisan config:clear

to make sure you are not using any cache. After that there shouldn't be any problems

NOTE

if you are getting this issue even after this then go to bootstrap/cache/config.php as mentioned by Marcin Nabiałek down there in comments and in that delete Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class from the array of providers after that rerun the above three commands.

Related