You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm trying to build the project I run into the error
Unable to resolve "./RCTNetworking" from "node_modules/react-native/Libraries/Network/XMLHttpRequest.js"
Seems like the issue is node_modules/react-native/Libraries/Network directory has an RCTNetworking.android.js and RCTNetworking.ios.js but the metro.config.js can't find a corresponding file for web.
I have a dependency that makes my API requests with axios (that i access from my npm module / not directly from my app components/stores.
I've tried mocking out the RCTNetworking but can't seem to get anything to work. It will either not make the request or will fail with the same import error.
It hides the error on build but I can't make HTTP calls and gives me the following error when I try to make an API request
TypeError: Cannot read properties of undefined (reading 'default')
at XMLHttpRequest.send (XMLHttpRequest.js:527:7)
at dispatchXhrRequest (xhr.js:195:13)
at tryCallTwo (core.js:45:5)
at doResolve (core.js:200:13)
at new Promise (core.js:66:3)
at xhr (xhr.js:15:10)
at ThrottlingAdapter.<anonymous> (adapter.js:186:40)
at Generator.next (<anonymous>)
at adapter.js:8:71
at tryCallTwo (core.js:45:5)
at Axios.request (Axios.js:45:41)
Expected behavior
Would expect to compile and be able to make API requests.
Steps to reproduce
npx expo start --web -c
"react-native": "0.74.2",
"expo": "^51.0.0"
Test case
N/A
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the issue
When I'm trying to build the project I run into the error
Unable to resolve "./RCTNetworking" from "node_modules/react-native/Libraries/Network/XMLHttpRequest.js"
Seems like the issue is node_modules/react-native/Libraries/Network directory has an RCTNetworking.android.js and RCTNetworking.ios.js but the metro.config.js can't find a corresponding file for web.
I have a dependency that makes my API requests with axios (that i access from my npm module / not directly from my app components/stores.
I've tried mocking out the RCTNetworking but can't seem to get anything to work. It will either not make the request or will fail with the same import error.
For instance if I do
It hides the error on build but I can't make HTTP calls and gives me the following error when I try to make an API request
Expected behavior
Would expect to compile and be able to make API requests.
Steps to reproduce
"react-native": "0.74.2",
"expo": "^51.0.0"
Test case
N/A
Additional comments
No response
The text was updated successfully, but these errors were encountered: