0
votes

I have a freshly installed Laravel 7.10.* I want to install the Backpack composer require backpack/generators --dev but cannot install the generators. Here is the error.

Your requirements could not be resolved to an installable set of packages.

Problem 1 - Installation request for laravel/framework (locked at v7.10.3, required ^7.0) -> satisfiable by laravel/framework[v7.10.3]. - Installation request for backpack/generators ^3.0 -> satisfiable by backck/generators[3.0.0, v3.0.1, v3.x-dev]. - Can only install one of: backpack/crud[4.1.x-dev, 4.0.61]. - Can only install one of: backpack/crud[4.1.x-dev, 4.0.61]. - Can only install one of: backpack/crud[4.1.x-dev, 4.0.61]. - Conclusion: install backpack/crud 4.1.x-dev - Installation request for backpack/crud (locked at 4.0.61, required as 4.*) -> satisfiable by backpack/crud[4.0.61].

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

This is my composer.json

{ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": [ "framework", "laravel" ], "license": "MIT", "require": { "php": "^7.2.5", "backpack/crud": "4.0.*", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "^7.0", "laravel/tinker": "^2.0" }, "require-dev": { "facade/ignition": "^2.0", "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", "nunomaduro/collision": "^4.1", "phpunit/phpunit": "^8.5" }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true }, "extra": { "laravel": { "dont-discover": [] } }, "autoload": { "psr-4": { "App\": "app/" }, "classmap": [ "database/seeds", "database/factories" ] }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "minimum-stability": "dev", "prefer-stable": true, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ] } }

1
can you show us the composer.json?Random Name
Yes. I can showBiblbroks42
You can look sorry my syntaxBiblbroks42
And what have you tried to resolve this?Nico Haase
Yes. This(down below) Answer help me to resolve.Biblbroks42

1 Answers

2
votes

The problem is that you locked the backpack/crud version as 4.0.*, but for the backpack/generators the satisfiable versions are these: 4.1.0, 4.1.1, 4.1.x-dev

So you should change this line in your composer.json:

"backpack/crud": "4.0.*",

to this:

"backpack/crud": "4.1.*",

then update the composer packages:

composer update

and finally install the generator package:

composer require backpack/generators --dev