title: Php artisan optimize is failing on production server
body: <p>Running <code>composer install</code> on a production server via a bash script is failing at <code>post-install-cmd</code> <code>php artisan optimize</code> with the error <code>There are no commands defined in the "jwt" namespace</code>. </p>
  
  <p>To try to resolve the issue I added the following commands before <code>php artisan optimize</code></p>
  
  <p><code>"php artisan clear-compiled",
   "php artisan cache:clear",
   "php artisan config:clear",
   "php artisan config:cache",</code></p>
  
  <p>Running <code>composer install</code> locally works fine. I can run the commands through a script locally without a problem.</p>
  
  <p>The failure is happening while running <code>composer install</code> through a script on the production server. If I log onto the server and run the commands manually I do not generate the error. </p>
  
  <p>Not sure how to debug, any ideas?</p>