Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 6 artisan package:discover rename bootstrap/cache/packages

After composer update I got an error:

In Filesystem.php line 146:

rename(/var/www/bootstrap/cache/packages.phpE7r5E4,/var/www/bootstrap/cache /packages.php): No such file or directory

Artisan commands don't work anymore. Already tried:

composer du
composer install
composer update
like image 652
Luis Fernando Richter Avatar asked Sep 18 '19 10:09

Luis Fernando Richter


2 Answers

I found the problem, my windows docker (version 2.1.0.3) sometimes fails to execute. I don't know how it looks like the packages.php file just got locked. So here is the recipe to fix:

  1. I restarted windows,
  2. deleted all the files inside bootstrap\cache
  3. started the containers
  4. run artisan optimize
  5. run composer du

Everything went back to work like a magic. :)

like image 193
Luis Fernando Richter Avatar answered Oct 11 '22 23:10

Luis Fernando Richter


run this command: composer dump-autoload This command will clean up all compiled files and their paths.

enter this command in your terminal for clear cache: php artisan cache:clear

like image 38
Udhav Sarvaiya Avatar answered Oct 11 '22 22:10

Udhav Sarvaiya