Friday, December 31, 2021

[FIXED] Laravel throws 'The bootstrap/cache directory must be present and writable' error after update

Issue

I used 'composer update', which updated a few packages. During the updating process the website still functions. However, after it says 'The compiled services file has been removed', the website doesn't load and instead says:

Exception in ProviderRepository.php line 190:
The bootstrap/cache directory must be present and writable.

The weirdest thing is, when I run 'composer update' again, the website starts to work again, until the compiled services file is removed, at which point it throws the same error again. I have already tried the usual things that should be done when this error appears (chown -R everything to the right user/group and chmod all the files and folders 664 and 775 respectively).

I don't know what to do anymore, as the error doesn't seem 'correct'..


Solution

Try this after you have run the composer update:

php artisan cache:clear


Answered By - Jim Wright

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.