Closed ddelizia closed 7 months ago
Hi, in a node environment, please check that you're importing the search client from algoliasearch
instead of algoliasearch/lite
if it's not already the case. You can also customize the HTTP requester by following this guide: https://www.algolia.com/doc/api-client/getting-started/customize/javascript/?client=javascript#changing-http-request-methods.
Actually for cloudflare you should use the fetch
requester: https://github.com/algolia/algoliasearch-client-javascript/tree/master/packages/requester-fetch
Current configuration
How to reproduce
I have setup nexts to work with app router following the documentation provided: https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/react/#app-router-experimental
I have configured the
page.tsx
to use the edge runtime, which will look as follow:Run the next application and you will get the following error:
It seems that the issue is that algoliasearch is using
XMLHttpRequest
which is not present on the edge runtime.