React Native: Property 'Document' doesn't exist
#2359
-
|
I'm currently using
After digging around, I found out the latest The usage can be seen here: XMLHttpRequestController.ts I'm wondering if anyone else has faced this issue and how did they solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
|
I will never understand why project just opt-in into using seemingly incompatible export conditions by default. Since Metro prioritizes
We have been looking for a champion to bring the React Native integration into a good shape. None has showed up as of now. Since not many issues have been reported about this, I deem React Native support as a non-priority task. I don't develop in React Native so it's hard for me to have a proper grasp on the workflows and project specifics there. SolutionThe solution is to configure |
Beta Was this translation helpful? Give feedback.
-
|
I was able to resolve this issue by switching my HTTP client to Fetch vs. Axios. Luckily we were early enough in our project where this wasn't a huge lift. It might make sense to officially document the lack of Axios support. Interestingly enough I was still seeing console errors after switching to Fetch but the responses were resolving correctly. I didn't have time to debug further and just ended up suppressing the error. |
Beta Was this translation helpful? Give feedback.





I will never understand why project just opt-in into using seemingly incompatible export conditions by default. Since Metro prioritizes
browser, you get the browser build of@mswjs/interceptors, which includes XHR interception as it should.We have been looking for a champion to bring the React Native integration into a good shape. None has showed up as of now. Since not many issues have been reported about this, I deem React Native support as a non-priority task. I don't develop in React Native so it's hard for me to have a proper grasp on the workflows and project specifics there.
Solution
The solu…