-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Undefined is not an object (evaluating 'self.fetch') when importing Realm in React Native #22956
Comments
I can confirm this issue. This happens only in when "Debug JS Remotely" is turned off. |
This is likely an issue with the Which you can easily check with Remove the dependency which is using You'll find some solution stating to do: |
@leaphawk The only dependency is |
Hello there 👋 this issue doesn't have a repro (which means, a Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗 |
Please upgrade to 0.59, and also provide reproducible demo. |
In my case this was caused by using the legacy babel plugin "transform-es2015-modules-commonjs". |
…en trying to use fetch: facebook/react-native#22956
Environment
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 1.47 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.1 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 27
Build Tools: 27.0.3, 28.0.3
System Images: android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.2 => 0.57.2
npmGlobalPackages:
react-native-cli: 2.0.1
Description
I get the following error message when importing Realm.
The issue has already been discussed here and here.
Reproducible Demo
I tried the solution provided in the other posts mentioned under Description, and the issue was resolved temporarily, until I added a reference to one of my mobx-state-tree stores. I did try the same solution in other screens, but that didn't help.
The text was updated successfully, but these errors were encountered: