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

rgillera's avatar

Class 'Laravel\Spark\Providers\SparkServiceProvider' not found

I get this error message after fresh cloned from bitbucket. How will I fix this?

FatalThrowableError in compiled.php line 7633: Class 'Laravel\Spark\Providers\SparkServiceProvider' not found

0 likes
11 replies
bobbybouwmann's avatar

You need to run composer install first before you can start with your project. This command will download all packages for your project, whcih you can find in yourcomposer.json file.

1 like
rgillera's avatar

@bobbybouwmann Yes I already ran that command, composer install, npm install, gulp, php artisan migrate --seed.

EventFellows's avatar

Did you check if the file and class is there?

Then you know whether it is missing or just not recognizing it.

teesquare's avatar

Very same thing happens for my brand new install of spark/laravel :(

1 like
john-a-zoidberg's avatar

Well.. you are not alone :) Just ran into same issue.. can't figure out what went wrong

Korona123's avatar

Alright so what was happening with me. I went to vendor/laravel/spark and the folder is empty. I think there is supposed to be some kind of symlink here to the spark folder in the project root but honestly I am not a 100% sure how to do it.

So in : project_root/vender/laravel/spark -> project _root/spark

So i was able to do cp spark/. vender/laravel/spark/

And it all started working again but I dont think this is correct.

phpguru's avatar

It's a permissions error for us sometimes, too. This is due to the fact that the spark repo is a paid for repository and requires rights that composer doesn't handle. If you bought spark, it should be installed in the project root (by the Spark installer).

Check to see if vendor/laravel/spark exists but it's an empty folder. If so, delete it and run composer install again.

You should have this in your composer.json under the "require" node:

"laravel/spark": "*@dev",

Then under "repositories" node you have a

"url": "./spark"

This configuration allows composer to install laravel/spark from the repository url ./spark in the local project.

azimidev's avatar
rm -rf vendor

composer update

Job is done!

5 likes
greg_rs's avatar

I got this problem when I had an old installation from 2017 of spark-installer in my path. Zapped that, re-installed, fixed my path and it went smoothly.

maden's avatar

Migrating an installation meant the symlink from ./vendor/laravel/spark-aurelius to ./spark was now just a file! I removed the file and recreated the symlink with

cd ./vendor/laravel
rm -f  spark-aurelius
 ln -s ../../spark spark-aurelius

Please or to participate in this conversation.