algolia / algolia/autocomplete

Module '"algoliasearch/lite"' has no exported member 'SearchClient'.ts(2305)

Open
#1,290 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
341
Avg merge
3d 1h
Merged PRs (30d)
5

Description

Line 1:

`import type { SearchClient } from 'algoliasearch/lite';
`

In this file:

https://github.com/algolia/autocomplete/blob/next/examples/react-instantsearch/src/components/Autocomplete.tsx

is giving me the following error:

`Module '"algoliasearch/lite"' has no exported member 'SearchClient'.ts(2305)
`

How to fix?

I'm using the following npm packages:

"@algolia/autocomplete-js": "1.17.7",
"@algolia/autocomplete-plugin-query-suggestions": "1.17.7",
"@algolia/autocomplete-plugin-recent-searches": "1.17.7",
"@algolia/autocomplete-theme-classic": "1.17.7",
"algoliasearch": "5.15.0",
"react-instantsearch": "7.13.8",
"typescript": "5.7.2"

Contributor guide

Open the contributing guide

Research direction

Start with examples/react-instantsearch/src/components/Autocomplete.tsx and the listed algoliasearch, react-instantsearch, and TypeScript versions. Reproduce the type-checking error and inspect the installed package declarations to determine the compatible type import or dependency combination. Done means the example no longer reports the missing SearchClient export.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, search
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.