在Laravel forge上遇到类/服务识别问题

So I'm trying to push my code to forge and on doing so I receive the following error message:

[Symfony\Component\Debug\Exception\FatalThrowableError]                     
  Fatal error: Class 'Skovmand\Mailchimp\MailchimpServiceProvider' not found  

Script php artisan optimize handling the post-install-cmd event returned with an error

  [RuntimeException]  
  Error Output:       

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

This is, I believe to the following package: https://github.com/skovmand/mailchimp-laravel.

I'm not sure what could be going wrong here. There doesn't seem to be any issues with the declaration of the service that I've set in the config/app.php file under the service providers like this: Skovmand\Mailchimp\MailchimpServiceProvider::class.

So I would appreciate any responses here.

Thanks!

First, check if files are in a vendor directory, they could not be installed. If the files are there, try to run composer dumpauto -o.

If command didn't help, try to manually delete autoload files and run the command again.

So apparently the issue was that I was pulling in the dev version of the packages i was using instead of the stable versions. Common mistake. Remember to place composer package declarations in 'require' rather than in 'require-dev' in your composer.json file guys.