Permissions problems with composer and artisan
I am running Laravel 8, with php 7.4.8 using laragon on windows 10 and I have found myself in a situation where I cannot clear cache, run any composer commands or artisan cache:clear.
Composer install and composer update give the following:
Could not delete C:\laragon\www\disco\vendor/composer/package-versions-deprecated\CHANGELOG.md:
This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed
Composer dump-autoload gives the following:
/src/PackageVersions/Versions.php): Access is denied. (code: 5)
Php artisan cache:clear gives the following:
Failed to clear cache. Make sure you have the appropriate permissions.
This is all new behaviour, I have had no issues working on this project until recently.
I have tried many times to update the permissions with chmod to no effect.
Any help would be very much appreciated.
@stitchtrove I've had problems with composer v2.1+, I found the 2.0 version to be more stable on Windows. This may be worth a try:
composer self-update 2.0.14