0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

laravel 8.x debugbarのインストール

Posted at

laravel8でdebugbarのインストール

エラーが出て解決までに時間がかかったため、同じようなエラーに遭遇している人のお役に立てればと思い残しときます。

インストール

composer require barryvdh/laravel-debugbar

インストールのコマンドを叩いたところ、以下のエラーが出てきた。

エラー

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

  Problem 1
    - barryvdh/laravel-debugbar[v3.8.0, ..., 3.8.x-dev] require illuminate/routing ^9|^10 -> found illuminate/routing[v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires barryvdh/laravel-debugbar ^3.8 -> satisfiable by barryvdh/laravel-debugbar[v3.8.0, v3.8.1, 3.8.x-dev].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require barryvdh/laravel-debugbar:*" to figure out if any version is installable, or "composer require barryvdh/laravel-debugbar:^2.1" if you know which you need.

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

原因と解決

laravel8以降は、Debugbarのサービスプロバイダが自動的に登録されなくなり、サービスプロバイダを手動で登録でエラーが解決する。

config/app.phpのそれぞれの行に以下を追加。

providers
Barryvdh\Debugbar\ServiceProvider::class,
aliases
'Debugbar' => Barryvdh\Debugbar\Facade::class,

再度インストールのコマンドを実行で無事インストールされた。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?