Laravel 6 artisan package:discover rename bootstrap/cache/packages
Asked Answered
H

5

7

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
Hoosegow answered 18/9, 2019 at 10:35 Comment(2)
Do composer dump-autoload or artisan cache:clear help?Androclinium
Empty bootstrap/cache directory, and run the commands composer dumpa, php artisan optimize:clear. Try this.Overspend
H
3

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. :)

Hoosegow answered 18/9, 2019 at 11:36 Comment(0)
P
2

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

Preliminaries answered 18/9, 2019 at 10:47 Comment(0)
B
1

I had the same error and these commands helped me:

1. composer dump-autoload 
2. php artisan cache:clear
3. php artisan optimize:clear
Bennet answered 11/4, 2021 at 11:38 Comment(0)
E
0

For me deleting the composer.lock file and then running composer install fixed the issue.

Etherify answered 4/6, 2021 at 8:31 Comment(0)
A
-1

Try:

composer dump-autoload

or:

artisan cache:clear

after you update or make changes to composer.json to refresh everything.

Androclinium answered 18/9, 2019 at 10:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.