Skip to content

[bug]: React Native: Unable to resolve module http from node_modules/@algolia/requester-node-http/src/createHttpRequester.ts:  #1554

@giantslogik

Description

@giantslogik

Description

With
"algoliasearch": "^5.4.3",
"react-instantsearch-core": "^7.13.1",
"react-native": "0.73.6"

the algolia client fails with:

Unable to resolve module http from src/mobile-app/node_modules/@algolia/requester-node-http/src/createHttpRequester.ts: http could not be found within the project or in these directories:
  node_modules
  ../../node_modules
> 1 | import http from 'http';
    |                   ^
  2 | import https from 'https';
  3 | import { URL } from 'url';
  4 |

This worked previously with "algoliasearch": "^4.23.3" and "react-instantsearch-hooks": "^6.33.0"

It appears that the algoliasearch 5 , package is no longer compatible with react native.

This is the same error as #1547 which is incorrectly closed.

Client

Search

Version

5.4.3

Relevant log output

Unable to resolve module http from src/mobile-app/node_modules/@algolia/requester-node-http/src/createHttpRequester.ts: http could not be found within the project or in these directories:
  node_modules
  ../../node_modules
> 1 | import http from 'http';
    |                   ^
  2 | import https from 'https';
  3 | import { URL } from 'url';
  4 |

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