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

sambellerose's avatar

Error when running composer install with Spark folder already in vendor

So I'm trying to configure a Laravel Spark app to be used with Envoyer. The problem I had before was cloning the Spark repo which required a token and a Github validation, so I was told to commit the vendor directory directly inside the project which I did.

So laravel/spark-aurelius is already in my vendor folder and then when I run composer install, here's the error I get and I wonder why it can't find the class which is there in the vendor folder.

> @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 thought that adding this would have done the tricks, but I still get the error

"extra": {
        "laravel": {
            "dont-discover": [
                "laravel/spark-aurelius"
            ]
        }
    },

Any help would be greatly appreciated!

0 likes
4 replies

Please or to participate in this conversation.