3

安装 laravel/ui 时出现以下错误。

Using version ^2.0 for laravel/ui

  Problem 1
    - Conclusion: remove laravel/framework v6.18.0
    - Conclusion: don't install laravel/framework v6.18.0
    - laravel/ui 2.x-dev requires illuminate/support ^7.0 -> satisfiable by laravel/framework[7.x-dev], illuminate/support[7.x-dev, v7.0.0, v7.0.1].
    - laravel/ui v2.0.0 requires illuminate/support ^7.0 -> satisfiable by laravel/framework[7.x-dev], illuminate/support[7.x-dev, v7.0.0, v7.0.1].
    - Can only install one of: laravel/framework[7.x-dev, v6.18.0].
    - don't install illuminate/support 7.x-dev|don't install laravel/framework v6.18.0
    - don't install illuminate/support v7.0.0|don't install laravel/framework v6.18.0
    - don't install illuminate/support v7.0.1|don't install laravel/framework v6.18.0
    - Installation request for laravel/framework (locked at v6.18.0, required as ^6.2) -> satisfiable by laravel/framework[v6.18.0].
    - Installation request for laravel/ui ^2.0 -> satisfiable by laravel/ui[2.x-dev, v2.0.0].

我的 laravel 版本是 6.18 这里是一些重要的内容composer.json

"require": {
    "php": "^7.2",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "^6.2",
    "laravel/tinker": "^2.0"
},
"require-dev": {
    "facade/ignition": "^1.4",
    "fzaninotto/faker": "^1.9.1",
    "mockery/mockery": "^1.0",
    "nunomaduro/collision": "^3.0",
    "phpunit/phpunit": "^8.0"
}

如何解决这个问题呢?

4

3 回答 3

13

试试这个:它适用于我的 laravel 6.2

composer require laravel/ui "^1.2"

于 2020-03-31T04:15:01.773 回答
7

如果您使用的是 laravel 6,请尝试此命令

composer require laravel/ui "^1.0" --dev -vvv

您是否正在尝试升级到 laravel 7?

如果是这种情况,您必须做错事,我只是按照我所说的进行更新,没有任何问题。

您必须先更新 laravel 而不是框架。

composer update在 laravel 更新后为框架运行。

如果你没有正确地做到这一点,你总是会得到错误。

另外,运行composer clearcache

composer selfupdate

composer dumpautoload

如果需要的话。

有时也有助于删除供应商并重新运行作曲家安装。

于 2020-03-05T14:26:49.417 回答
6

Laravel ui 大约一个小时前与 Laravel 7 一起发布,Laravel ui 2.0 依赖于 Laravel 7。

将您的项目升级到 Laravel 7 或安装 Laravel ui 1.x。

于 2020-03-03T15:05:13.800 回答