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

tnort's avatar
Level 4

Missing class of a vendor package after deployment

Hi all,

Thank you for looking into this, I am having some issues with Error: Class "Postmark\PostmarkClient" not found in /var/www/html/app/Jobs/SendBatchEmails.php:36.

I tested everything in dev env and when deployed, after running the composer install I am getting this issue. Any idea what could it be?

I also run:

sudo php artisan cache:clear
composer dump-autoload

But still not working.

0 likes
2 replies
jlrdw's avatar

Are you sure the package is included in composer.json? Is it a composer package or a package.json?

tnort's avatar
Level 4

@jlrdw, yeah it was included, I deliberately installed it on the server. What I found out is that it was due to directory permission as if the user running the supervisor process had a different role group than the one running the application itself thus when the supervisor would reach that particular class it wouldn't have access to the vendor dir.

I am not sure if that makes sense but after I rerun the supervisor with the same user I am running the application it just worked.

Please or to participate in this conversation.