Mehedi Hasan Methun
Mehedi Hasan Methun

Reputation: 109

Class 'AlgoliaSearch\Version' not found

I am trying to add algolia search system into my laravel(5.6) web app. For this,

I followed below instructions

  1. composer require laravel/scout

  2. php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

  3. use Searchable trait into my User model

  4. use Laravel\Scout\Searchable;

  5. composer require algolia/algoliasearch-client-php

  6. php artisan scout:import "App\User"

I also set (ALGOLIA_APP_ID) and (ALGOLIA_SECRET) both of my .env and scout.php file

I also added some dummy data to my users table and when I try to import those data to my algolia site by using (php artisan scout:import "App\User") this command I am getting this error (Class 'AlgoliaSearch\Version' not found)

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Upvotes: 3

Views: 2032

Answers (1)

kireeti9
kireeti9

Reputation: 288

I had the almost same problem

When I was doing the batch import using the command php artisan scout:import got this Error: In EngineManager.php line 31: Class 'AlgoliaSearch\Version' not found

Downgrading the version fixed it

composer require algolia/algoliasearch-client-php:^1.27

Upvotes: 6

Related Questions