Question

[RuntimeException] in Composer

Posted October 8, 2014 11.6k 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.

Submit an Answer