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

michalis's avatar

problem deploying on heroku (composer/dependency issue) :(

guys the app works ok on the computer, and composer update runs just fine, but when i try to deploy on heroku it wont deploy because it cant get through installing the dependencies, here's what I get

  Generating optimized autoload files
       PHP Fatal error:  Class 'Cartalyst\Sentinel\Laravel\SentinelServiceProvider' not found in /tmp/build_648472b09f7de5f2769d57407cd297ad/haredigital-Checkpoint_Live-8659a3562c45acea0fc589984d25a3c37fe0c806/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
       
       
                                                                               
         [Symfony\Component\Debug\Exception\FatalErrorException]               
         Class 'Cartalyst\Sentinel\Laravel\SentinelServiceProvider' not found

    Script php artisan clear-compiled handling the post-install-cmd event returned with an error

anyone got any clue?

0 likes
7 replies
davidjoan's avatar

Hi try to run this

heroku run php artisan clear-compiled --app heroku-name-app
1 like
michalis's avatar

@davidjoan

thank you for posting, i did what you said and here's what I get back

$ heroku run php artisan clear-compiled --app checkpointlive
Running `php artisan clear-compiled` attached to terminal... up, run.5401
bash: php: command not found
davidjoan's avatar

It's look like a heroku problem check that with this command

heroku status

don't forget to run this in your root directory of your project

1 like
michalis's avatar

@davidjoan

problem is I have linked the app to get the code directly from github, so the root directory of my project is linked to a gihub repository

what should I do?

should I maybe copy the app to another folder, set heroku as the remote master and push from there, and then set it to update through github?

michalis's avatar

@davidjoan you are a genius, how can I ever thank you

how did you find the thread? I was looking everywhere all day? :P

1 like
kfiroj236's avatar

getting this error when I tried to push my laravel 5.8 project to heroku

ERROR: Dependency installation failed!

remote: !

remote: ! The 'composer install' process failed with an error. The cause

remote: ! may be the download or installation of packages, or a pre- or

remote: ! post-install hook (e.g. a 'post-install-cmd' item in 'scripts')

remote: ! in your 'composer.json'.

Please or to participate in this conversation.