Open abdellahrk opened 4 years ago
autocomplete.js v3 is not compatible with algoliasearch v4. you need to either add a custom source (like this: https://github.com/algolia/autocomplete.js#standalone) or downgrade to algoliasearch@3
@Haroenv I'm seeing this issue too. Just to check, is autocomplete
(as distinct from autocomplete.js
) compatible with algoliasearch
v4? If not, what is the simplest path forward for someone with legacy autocomplete.js
code and newer algoliasearch
v4 code?
P.S. The standalone section of the autocomple.js
docs has evidently been removed--do you know where it lives now?
I ended up resolving this by simply rewinding my package.json
so it contained:
"dependencies": {
"algoliasearch": "^3.32.0",
}
(The old version of algoliasearch used elsewhere in my app.) Then I installed a more updated version of algoliasearch @v4 under an alias:
yarn add algoliasearchV4@npm:algoliasearch@4.11.0
That command adds the second line below to package.json
:
"dependencies": {
"algoliasearch": "^3.32.0",
"algoliasearchV4": "npm:algoliasearch@4.11.0",
}
Now when I want to use algoliasearch @3 I can use:
import algoliasearch from "algoliasearch";
And when I want to use algoliasearch @4 I can use:
import algoliasearch from "algoliasearchV4";
🚀
That seems like a straightforward solution indeed, although in that case you're obviously doubling the frontend impact of the search client. If you can, I'd recommend updating to v4 everywhere
Yes absolutely in the long term everything should be on v4...
Hello, I am using algolia with Laravel
I am stuck
HTML
I can't figure out where the problem is.