[ErrorException] file_put_contents(./composer.json): failed to open stream: Permission denied
when i am trying to install->
composer require spatie/laravel-permission
on C:>
if you are using WSL try
sudo chown -R $USER /home/<username>/.config/composer
or
sudo chown -R $USER ~/.composer/
@neilstee i get: no exist the file or folder
excuse me my bad english, I speak spanish
Why are you trying to install a composer package to / at all???
composer update
composer require spatie/laravel-permission
That worked for me in 2025
@onyashed why wouldn't it? It works like that for 100's of thousand times per day for developers across the world
Please or to participate in this conversation.