概要
- composerを用いてbreezeをインストールしようとしたらエラーが出たので筆者の場合の解消方法をまとめる。
エラー
- どうやらバージョンがコンフリクトしている模様
$ composer require laravel/breeze
Deprecated: PHP Startup: Use of mbstring.internal_encoding is deprecated in Unknown on line 0
Using version ^1.11 for laravel/breeze
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/breeze[v1.11.2, ..., 1.x-dev] require illuminate/console ^9.21 -> found illuminate/console[v9.21.0, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
- laravel/framework is locked to version v9.1.0 and an update of this package was not requested.
- laravel/breeze[v1.11.0, ..., v1.11.1] conflict with laravel/framework <9.19.0.
- Root composer.json requires laravel/breeze ^1.11 -> satisfiable by laravel/breeze[v1.11.0, v1.11.1, v1.11.2, 1.x-dev].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/breeze:*" to figure out if any version is installable, or "composer require laravel/breeze:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
解決までの経緯
-
下記を実行してcomposerのupdateを実施した。
composer update
-
再度下記を実行したところ問題なくbreezeがインストールできた。
composer require laravel/breeze --dev