[RuntimeException] in Composer

October 8, 2014 4.1k views

I have cloned a GitHub repository, containing a Laravel Application, into my Droplet. When I try running "composer install --prefer-dist" to pull in vendor packages, I get the following:

"[RuntimeException] Could not scan for classes inside "/var/www/html/bookmanager/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.ph p" which does not appear to be a file nor a folder."

Has anyone seen this before and, if so, would you mind providing some guidance on how to resolve it?

Thanks much!

1 comment
  • removing vendor folder contents and running composer install to re-download whole vendor did the job for me

2 Answers

removing vendor folder contents and running composer install to re-download whole vendor did the job for me

This is because your composer.json cannot detect it (it is included for autoloading but it doesn't really exist with your downloaded version of the package).
Why? When composer tries to download your projects via git it uses the parameter export-ignore.
the parameter export-ignore tells git to ignore the specified files and directories defined inside .gitattributes file. This file .gitattributes can be found in the root directory of your base code.
So make sure this file doesn't include the file/directory causing the error.

Have another answer? Share your knowledge.