Laravel 6で新規プロジェクトを立ち上げて、composerでlaravel/uiをインストールしようとしたらエラーになってしまいました。
$ composer require laravel/ui
Using version ^3.3 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.3.0, ..., 3.x-dev] require illuminate/console ^8.42 -> found illuminate/console[v8.42.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/ui ^3.3 -> satisfiable by laravel/ui[v3.3.0, 3.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
バージョン要求を満たしてないみたいです。
Laravel 6 の公式ドキュメントを見たら、laravel/uiのバージョンを指定するように記載がありました。
The Bootstrap and Vue scaffolding provided by Laravel is located in the laravel/ui Composer package, which may be installed using Composer:
https://laravel.com/docs/6.x/frontend
composer require laravel/ui:^1.0 –dev
指定のコマンドで再チャレンジします。
$ composer require laravel/ui:^1.0 --dev
./composer.json has been updated
Running composer update laravel/ui
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking laravel/ui (v1.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' or '7z' may remediate them.
- Downloading laravel/ui (v1.3.0)
- Installing laravel/ui (v1.3.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
67 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
unzipがない、という警告が出てますが、とりあえずインストールはできたみたいです。
bugfixサポートも2021年9月に切れるので、そろそろLaravel6の利用も終えたほうがよさそうですね。
以上です。あなたのお役に立てればうれしいです。