typesense / typesense/typesense-js

Axios errors after react-native 0.79.1 upgrade

Open
#286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
569
Forks
99
Avg merge
5h 6m
Merged PRs (30d)
2

Description

After updating to react-native version 0.79.1, there is a problem with the axios package.

I tried to nodeify the react-native project regarding this issue, but it continues to give other errors.

Steps to reproduce
Steps to reproduce the behavior:

upgrade react-native 0.79.1
build and run project
See error

Error: Unable to resolve module url from .../node_modules/typesense/node_modules/axios/dist/node/axios.cjs: url could not be found within the project or in these directories:
  node_modules/typesense/node_modules
  node_modules
  3 |
  4 | const FormData$1 = require('form-data');
> 5 | const url = require('url');
    |                      ^
  6 | const proxyFromEnv = require('proxy-from-env');
  7 | const http = require('http');
  8 | const https = require('https');
"typesense": "2.0.3"
"react-native": "0.79.1",
"react": "19.0.0",
"axios": "1.9.0"

react-native info output:

System:
  OS: macOS 15.4.1
  CPU: (14) arm64 Apple M3 Max
  Memory: 597.59 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.11.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 4.5.3
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.02.17.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/ertucaglar/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.4
      - iOS 18.4
      - macOS 15.4
      - tvOS 18.4
      - visionOS 2.4
      - watchOS 11.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.3/16E140
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 22.0.2
    path: /usr/bin/javac
  Ruby:
    version: 3.2.3
    path: /Users/ertucaglar/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 16.0.2
    wanted: 16.0.2
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.79.1
    wanted: 0.79.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the build with react-native 0.79.1, typesense 2.0.3, and axios 1.9.0, then inspect typesense/node_modules/axios/dist/node/axios.cjs and the reported unresolved url import. Compare the React Native and Axios package behavior to determine the compatibility boundary; done means the project builds and runs without this module-resolution error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.