Call to undefined method getCachedCompilePath()

Sometimes I get this error in Laravel, when running the composer update command:


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

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

I think this error comes if I have changed the destination of the Laravel install (changed foldername or something like that).

But it can be solved by deleting vendor/compiled.php, and then run the composer update command again.

In some cases, you also need to delete storage/framework/compiled.php.

Solution found here:'

Martin Schadegg Rasch Jensen