Search code examples
phplaravelcomposer-php

Error while updating laravel from 6.03 to 6.18


I have this error when trying to upgrade my Laravel from 6.03 to 6.18 Could not delete D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate: This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed

PS D:\xampp\htdocs\XXXXX> composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 35 updates, 0 removals
  - Updating laravel/framework (v6.0.3 => v6.18.35):     Update failed (Could not delete D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate:
This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed)
    Would you like to try reinstalling the package instead [yes]?
  - Removing laravel/framework (v6.0.3)


  [RuntimeException]
  Could not delete D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate:
  This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

PS D:\xampp\htdocs\BaladyFreshFarm>

Solution

  • You could try removing D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate manually. If this not work, try restart and turn off antivirus, then try again.