i got this error (Class "BarryvdhDebugbarServiceProvider" not found) when i push my laravel 8 project in heroku

  barryvdh, heroku, laravel, php, phpdebugbar

when i push my laravel 8 project in heroku:

remote:        Generating optimized autoload files
remote:        > IlluminateFoundationComposerScripts::postAutoloadDump
remote:        > @php artisan package:discover --ansi
remote:        In ProviderRepository.php line 208:
remote:          Class "BarryvdhDebugbarServiceProvider" not found
remote:        Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
remote:  !     WARNING: A post-autoload-dump script terminated with an error
remote:  !     ERROR: Dependency installation failed!
remote:  !     
remote:  !     The 'composer install' process failed with an error. The cause
remote:  !     may be the download or installation of packages, or a pre- or
remote:  !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
remote:  !     in your 'composer.json'.
remote:  !     
remote:  !     Typical error cases are out-of-date or missing parts of code,
remote:  !     timeouts when making external connections, or memory limits.
remote:  !     
remote:  !     Check the above error output closely to determine the cause of
remote:  !     the problem, ensure the code you're pushing is functioning
remote:  !     properly, and that all local changes are committed correctly.
remote:  !     
remote:  !     For more information on builds for PHP on Heroku, refer to
remote:  !     https://devcenter.heroku.com/articles/php-support
remote:  !     
remote:  !     REMINDER: the following warnings were emitted during the build;
remote:  !     check the details above, as they may be related to this error:
remote:  !     - Your 'composer.lock' is out of date!
remote:  !     - A post-autoload-dump script terminated with an error
remote:  !     Push rejected, failed to compile PHP app.
remote:  !     Push failed

all solutions in the internet to remove in app confing debugber in providers but i do not want to remove it any help to stay debugbar in my project and run in heroku
what I have to do ?

Source: Laravel

Leave a Reply