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

maximew's avatar

Target class does not exist.

Hello,

From time to time, when I deploy on Vapor with new files (such as Seeders), I get an error during deployment.

Target class [xxxTableSeeder] does not exist.

Any idea?

I've already try to add composer dump-autoload in my build but it doesn't solve the issue.

Please note that deployments are made from Github Actions.

0 likes
5 replies
maximew's avatar

Unfortunately, no. I use GitHub Actions and every now and then it still happens. Usually, I just manually deploy from my local machine and then the CI works again.

jbryan.canas's avatar

I know this is an old post but I experienced this too in my GitHub Actions, Here's the error I encountered after the deployment Target class [App\Services\AuthServices.php]

but when I checked the app/Services folder it is named just fine, the problem is in our repository it was named like this app/services.

so I just renamed the folder in my local using the git mv command to properly rename the folder then pushed it to our repository

Please or to participate in this conversation.