Laravel/uiをrequireして、Installation failed, reverting ./composer.json to its original content.と出た時の対処法

% composer require laravel/ui
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Using version ^3.1 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v7.29.3
    - Conclusion: don't install laravel/framework v7.29.3
    - laravel/ui 3.x-dev requires illuminate/filesystem ^8.0 -> satisfiable by illuminate/filesystem[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.10.0, v8.11.0, v8.11.1, v8.11.2, v8.12.0, v8.12.1, v8.12.2, v8.12.3, v8.13.0, v8.14.0, v8.15.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0, v8.9.0].
    - laravel/ui v3.1.0 requires illuminate/filesystem ^8.0 -> satisfiable by illuminate/filesystem[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.10.0, v8.11.0, v8.11.1, v8.11.2, v8.12.0, v8.12.1, v8.12.2, v8.12.3, v8.13.0, v8.14.0, v8.15.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0, v8.9.0].
    - don't install illuminate/filesystem 8.x-dev|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.0.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.0.1|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.0.2|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.0.3|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.0.4|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.1.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.10.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.11.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.11.1|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.11.2|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.12.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.12.1|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.12.2|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.12.3|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.13.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.14.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.15.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.2.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.3.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.4.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.5.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.6.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.7.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.7.1|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.8.0|don't install laravel/framework v7.29.3
    - don't install illuminate/filesystem v8.9.0|don't install laravel/framework v7.29.3
    - Installation request for laravel/framework (locked at v7.29.3, required as ^7.0) -> satisfiable by laravel/framework[v7.29.3].
    - Installation request for laravel/ui ^3.1 -> satisfiable by laravel/ui[3.x-dev, v3.1.0].


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

公式ドキュメントを見ると7.Xでは、2.4みたいなのでそれでコマンドを叩いてみます。
https://laravel.com/docs/7.x/frontend#introduction

% composer require laravel/ui:^2.4
zsh: no matches found: laravel/ui:^2.4

no matches foundと出てしまったので、下記記事を参考にしました。

zshで no match found のときの解決策によると、

zshではマッチしないglob表現を含む場合no match error をprintしてコマンドをrunしなくなる。

zshで no match found のときの解決策より引用

みたいです。

下記解決策を実行して解決。

~/.zshrcに以下を記述します。

setopt +o nomatch 

その後下記コマンドを実行します。

% source ~/.zshrc

コメント

タイトルとURLをコピーしました