LoginSignup
8
11

More than 3 years have passed since last update.

composer require laravel/uiが失敗【Laravel7系 ログイン機能の実装】

Posted at

Laravel7 ログイン機能の実装するために詰まったので、メモしました。

公式ページから一つずつ実行

まず以下の公式ページからLaravel 7系でログイン機能を実装するために、いくつかのコマンドを打ってみました。

composer require laravel/ui
php artisan ui vue --auth

上記の二つをコマンドで打つ必要があるとのことでした。

でも

composer require laravel/ui

が失敗...。エラーは以下のものです。

composer require laravel/uiを打った後のエラー

Using version ^3.1 for laravel/ui
./composer.json has been updated
Running composer update laravel/ui
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/ui[v3.1.0, ..., 3.x-dev] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., 8.x-dev] but it conflicts with another require.
    - Root composer.json requires laravel/ui ^3.1 -> satisfiable by laravel/ui[v3.1.0, 3.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

いくつかの大切なことを翻訳してみた

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

あなたの要件は、インストール可能なパッケージのセットに解決できませんでした。

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

インストールに失敗し、./composer.json と ./composer.lock を元の内容に戻しました。

対処してみた!

うーん、なんでだろう…

参考になったサイトは以下のもの

https://atuweb.net/202003f_laravel-ui-composer-error/

https://packagist.org/packages/laravel/ui

https://laravel.com/docs/7.x/frontend#introduction

Packagist を調べてみると、laravel/ui に対応した Laravel 7は以下のものですね。

2.x 7 系

結論は

composer require laravel/ui:2

僕の場合は
composer require laravel/ui:2.5.0
としました。

composer require laravel/ui:^2.4
でも良さそう☺️

8
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
11