Frankly I think the pre-update-cmd should be moved to post-update-cmd in composer.json.. otherwise every time you add a provider that is not yet in the vendor dir this will happen unless you add the --no-scripts flag, which shouldn't really be necessary.
I believe the default composer.json that ships with laravel should have both of these in post-update-cmd not the clear in pre and optimize in post.. it's unnecessary the way it is now, just troublesome....
I received this after after accidentally installing composer in a sub-directory while trying to install a dependency. I obviously caught my error quickly and uninstalled the dependency and removed the composer files but I forgot to remove the vendor directory. After removing the vendor directory I ran composer update and all was good.
error like this usually caused by syntax error somewhere. try checking .env for eg. not properly quoted value, or running something like phplint on folder like app/ or config/
hmm.. chances are that the app.php providers is not updated. Try updating and running the update command. Chances are that your error should be gone now.
What helped me solve this issue was in AWS, I had to add the ip address of the server to the security group that was attached to the RDS instance. Then just ran composer update and off and running.