timokfine's avatar

Error on first composer update?

I have installed Laravel on my localhost using the Laravel installer. When I run 'composer update' for the first time on this fresh installation, I get the following error:

[Symfony\Component\Debug\Exception\FatalErrorException]

Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath()  

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

[RuntimeException]
Error Output: 

What does this error mean? Does it need to be fixed? If it does need fixing, how can I do so?

Thanks.

0 likes
8 replies
pmall's avatar
pmall
Best Answer
Level 56

@tmartinco I had this problem, removing the ./vendor/compiled.php file and running composer update again did the trick.

5 likes
leoalmar's avatar

if the @Shocm solution does not work, you can delete the compiled.php at vendor folder.

Then run

php artisan clear-compiled

Now you can run again

composer update

1 like
browner12's avatar

I ran into this issue as well on my Forge server. Removing the vendor/compiled.php file and re-deploying worked. Does anyone know why? It seems like artisan should be able to handle the file already existing, and this could possibly be a bug.

puzbie's avatar

The solution @Shocm posted wouldn't have any affect on how composer operates, would it?

Please or to participate in this conversation.