Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Nested React Native projects result in TypeError: undefined is not an object (evaluating self.fetch) #9599
Here's the repo: https://github.com/bloveit/react-native-redux-navigation
I'm trying to create a React Native example for this module but there is an error that occurs when trying to run the example.
I tried to pinpoint the error to a specific package, but no luck. I also tried nesting other React Native projects but the bug didn't happen (it seems to be an edge case).
Would greatly appreciate some insight on this bug!
@migueloller Hey I got it working using RN 0.33 and doing a hack - following this project:
Specifically, I added the following to my app.js:
I added it right at the top. Now my fetches are working properly again. Seems like a dirty hack but I was a bit desperate to get it going on iOS10 and now it's running again.
The workaround from other comments usually succeeds, but is not completely reliable because the packager/transpiler does not guarantee that that will run before whatever is calling fetch. Usually that isn't a problem because global.fetch is implemented as a lazy getter, but a module containing
referenced this issue
May 17, 2017
changed the title
Nested React Native projects result in `TypeError: undefined is not an object (evaluating self.fetch)`
Jul 21, 2017
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.