Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Giesen's avatar

Installing project on Envoyer

I've run into a problem with deploying my project on Envoyer.

Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
PHP Fatal error:  Trait 'Laravel\Spark\Configuration\ManagesAppOptions' not found in /home/forge/xx/releases/20161210121051/spark/src/Spark.php on line 7
PHP Fatal error:  Uncaught Exception: Bugsnag Error: Invalid API key in /home/forge/xx/releases/20161210121051/vendor/bugsnag/bugsnag/src/Bugsnag/Client.php:39
Stack trace:
#0 /home/forge/xx/releases/20161210121051/vendor/bugsnag/bugsnag-laravel/src/Bugsnag/BugsnagLaravel/BugsnagLaravelServiceProvider.php(61): Bugsnag_Client->__construct(NULL)
#1 /home/forge/xx/releases/20161210121051/vendor/laravel/framework/src/Illuminate/Container/Container.php(746): Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider->Bugsnag\BugsnagLaravel{closure}(Object(Illuminate\Foundation\Application), Array)
#2 /home/forge/xx/releases/20161210121051/vendor/laravel/framework/src/Illuminate/Container/Container.php(644): Illuminate\Container\Container->build(Object(Closure), Array)
#3 /home/forge/xx/releases/20161210121051/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(709): Illuminate\Container\Container->make('bugsnag', Array)
#4 /home/forge/xx/releases/20161210121051/v in /home/forge/xx/releases/20161210121051/vendor/bugsnag/bugsnag/src/Bugsnag/Client.php on line 39
Script php artisan optimize handling the post-install-cmd event returned with error code 255

Can somebody check this out? Thank you!

0 likes
2 replies
ejdelmonico's avatar
Level 53

Looks like your repo is missing a file or two. The way I deploy Laravel Spark projects with Forge and Envoyer works pretty well.

  • Deploy using enjoyer without automatically running composer.
  • Run composer update and Yarn
  • Migrate DB
  • Re-deploy projects and it should work.

Do not use the Spark installer because Spark is already installed in the repo code.

Giesen's avatar

Yes indeed, there was some files missing. Thank you very much.

Please or to participate in this conversation.