Posts Learn Components Snippets Categories Tags Tools new About
/

How to fix cache directory is not writeable in Laravel (Proceeding without cache)

Get to know how to resolve cache directory is not writeable in Laravel issue which output (proceeding without cache)

Created on Nov 15, 2021

10 views

When cloning a new Laravel project sometimes you might encounter an error when running "composer install" command and the error is as follows:
Cannot create cache directory /home/YOUR_USER/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache.

Method 1: Change Permission of Composer Cache Directory


To fix this error you have to change the ownership of your ".composer" directory.
sudo chown -R $USER $HOME/.composer
Do note that $USER refers to the current user and $HOME refers to the home directory.

Method 2: Update Composer


The 2nd method is to update the composer to the latest version if possibile. To do that you need to run the self-update command.
sudo composer self-update

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

)