Closed designhunger closed 1 year ago
I have created an empty npm project (npm init -y
) and copied your dependencies
and devDependencies
to package.json
. When executing npm i
I can see that the package electron
is installed.
Furthermore, I have analysed the dependency tree (npm list -a
), and I can see that only react-devtools
depends on electron
. By removing react-devtools
from your devDependencies
, the electron
package is not installed. It makes sense as react-devtools
as it is a tool. Please read https://www.npmjs.com/package/react-devtools for details.
Thanks @kneth - that makes total sense! Removing react-devtools also removed the error.
Of course I'm running directly into the next problem :D Of course I ran pod install, and also use the latest versions, as mentioned in some other issues here. Do you have any idea what might be the problem?
ERROR Error: Missing Realm constructor. Did you run "pod install"? Please see https://docs.mongodb.com/realm/sdk/react-native/install/ for troubleshooting, js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
Problem solved. I had to completely cleanup the cache, delete the node_modules and install all over again. Also I created a new expo build. If anyone else gets the same error, just follow the following steps.
@kneth - thanks again! I'll close this issue now.
yarn cache clean
rm -rf node_modules
rm yarn.lock
yarn
How frequently does the bug occur?
Always
Description
I'm running a React Native app on Expo with Hermes. Local testing is done on an iOS device with Metro, running on Mac OS. Our app is live and we now wanted to add data sync via mongodb and also the Auth Services. Problem is, I can do absolutely nothing, because I always get compilation errors, if I call one of the realm functions.
I installed the package realm 11.9.0 via npx expo install. The following very basic code already leads to the error.
The exact same error happens if I additionally install @realm/react 0.4.3:
Attached you'll find all of my dependencies in the project:
Would be great to get some advise on how to get this up and running. Thanks a lot!
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
11.9.0
What services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
No
Platform OS and version(s)
iOS
Build environment
Which debugger for React Native: ..
Cocoapods version
No response