Laravel-backup: Install crashed with "Target [Spatie\Backup\Tasks\Cleanup\CleanupStrategy] is not instantiable while building [Spatie\Backup\Commands\CleanupCommand]"

Created on 23 Jan 2020  路  7Comments  路  Source: spatie/laravel-backup

laravel 6.12

> @php artisan package:discover

In Container.php line 978:
Target [Spatie\Backup\Tasks\Cleanup\CleanupStrategy] is not instantiable while building [Spatie\Backup\Commands\CleanupCommand].                        

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

Most helpful comment

Same resolution as #957 for me as well. I deleted the bootstrap/cache/config.php file unlocks the correct installation of spatie/laravel-backup with composer and thus fixes artisans commands launch.

All 7 comments

Same error with me !
L ^6.2

Same resolution as #957 for me as well. I deleted the bootstrap/cache/config.php file unlocks the correct installation of spatie/laravel-backup with composer and thus fixes artisans commands launch.

Adding my voice to those. I can't believe the only solution is just manually delete the cache config file on _every_ deployment... !

I cannot reproduce this, I'm thinking you might have been doing something wrong when installing/updating the package. Please remove the package and try installing it again. Make sure to clear the config cache.

I understand you can't reproduce it, it's ok. But just to make it clear, what could have I do wrong while installing the package? I mean, this happened to me while running composer require spatie/laravel-backup...

I'll try to install in on other smaller project that doesn't require it just to check, if anything pops out, I'll get back.

Same resolution as #957 for me as well. I deleted the bootstrap/cache/config.php file unlocks the correct installation of spatie/laravel-backup with composer and thus fixes artisans commands launch.

Thanks. It helped me

Was this page helpful?
0 / 5 - 0 ratings