matchish / laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout
MIT License
705 stars 113 forks source link

[BUG] Target [Psr\Http\Client\ClientInterface] is not instantiable #220

Open lor08 opened 1 year ago

lor08 commented 1 year ago

Describe the bug Target [Psr\Http\Client\ClientInterface] is not instantiable while building [Elastic\Elasticsearch\Client, Elastic\Transport\Transport].

To Reproduce Steps to reproduce the behavior:

  1. Run a command 'php artisan scout:import'

Additional context Installed the package

composer require matchish/laravel-scout-elasticsearch

Set env variables

SCOUT_DRIVER=Matchish\ScoutElasticSearch\Engines\ElasticSearchEngine

Set ELASTICSEARCH_HOSTenv variable

I run the command to index and I get this error, what am I doing wrong?

Version Laravel 8.83 Scout 9.4.12

matchish commented 1 year ago

Did you register ElasticSearchServiceProvider?

https://github.com/matchish/laravel-scout-elasticsearch#rocket-installation