Skip to content

[bug]: Lastest version of algoliasearch doesn't function on React Native apps #1585

Open
@wildseansy

Description

@wildseansy

Description

When I upgrade algoliasearch in my app from 4.24.0 to 5.23.4, both the lite client and the normal client throw exceptions on initialization. Does algolia 5.x not work with React Native?

It seems to be the case:

Lite version

  import { liteClient } from "algoliasearch/lite";
  const client =  liteClient(ALGOLIA_CONFIG.appId, algoliaToken);

Throws:

 TypeError: 0, _clientCommon.createNullLogger is not a function (it is undefined) (browser.js 265:29)

Full version

  import { algoliasearch } from "algoliasearch";
  const client = algoliasearch(ALGOLIA_CONFIG.appId, algoliaToken);

In this case, algoliasearch isn't even exported correctly at runtime (its types say it's available via ESM).

It Throws:

TypeError: 0, _algoliasearch.algoliasearch is not a function (it is undefined)

Ideally, I would like to use the non-lite version because we want to log engagement events back to algolia, and I don't think that is supported in the lite version. Please advise if this is a bug or if this sdk version isn't available for React Native

Client

Search

Version

5.23.4, 5.24.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions