7

我尝试安装:

作曲家需要 laravel/ui

但我一直收到这个错误:

laravel/ui[v3.2.0, ..., 3.x-dev] 需要Illumination/console ^8.0 -> 找到Illumination/console[v8.0.0, ..., 8.x-dev] 但这些没有加载,可能是因为它与另一个需求冲突。- 根 composer.json 需要 laravel/ui ^3.2 -> 可由 laravel/ui[v3.2.0, 3.x-dev] 满足。这是我的composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3.1|^7.0.1",
        "laravel/framework": "^7.29",
        "laravel/tinker": "^2.5"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fakerphp/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.3",
        "phpunit/phpunit": "^8.5.8|^9.3.3"
    },
    "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"
        ]
    }
}

我是laravel的初学者。希望有人提供解决方案。提前致谢。

4

1 回答 1

26

我用这个:

composer require laravel/ui:^2.4

代替

composer require laravel/ui

它奏效了!根据这个 laravel 文档 [链接]:https ://laravel.com/docs/7.x/frontend

于 2021-03-03T15:17:42.300 回答