Home / Snippets / How to fix cache directory is not writeable in Laravel (Proceeding without cache)
How to fix cache directory is not writeable in Laravel (Proceeding without cache) cover

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

2.1K

3 years ago

0 comments

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
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

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

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this