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

sambellerose's avatar

Can't deploy Laravel Spark app using Forge

I'm trying to deploy my Laravel/Spark app using Forge but when I install the repository using Composer to install the dependency, I get the following error

- Installing laravel/spark-aurelius (v7.0.2): Downloading (connecting...)Downloading (failed)           Failed to download laravel/spark-aurelius from dist: The "https://api.github.com/repos/laravel/spark-aurelius/zipball/3945a8ed439fdc50a31f781730c22b0dbfca5ea3" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing laravel/spark-aurelius (v7.0.2): Cloning 3945a8ed43

I think it comes from registering the token for Spark with my Github account but how can I do this? Is there any way to configure the installation by executing custom commands before?

Any help would be really appreciated.

0 likes
3 replies
Cronix's avatar

The easiest thing to do is just commit spark in your repo. It's the only composer package we do that with and was actually recommended by Taylor himself as a workaround for a different problem. It's the only way to allow multiple devs to have access to it when not everybody is in the same github org/account. It would solve that issue as well.

sambellerose's avatar

Hi @cronix , thanks a lot for your quick reply.

I committed the spark folder in my repo and it did the trick.

The only error I got now is this one after running the composer install

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

In ProviderRepository.php line 208:
                                                                  
  Class 'Laravel\Spark\Providers\SparkServiceProvider' not found  
                                                                  

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

I double checked and the file is there

Any idea what the problem could be?

Maybe a fresh install will do it, I'll give it a try.

Tektōn's avatar

I have the same issue. And, nope, fresh install won't help either, I tried. The same error occurs. Not sure why

Please or to participate in this conversation.