realm-js: constructor must be of type 'function' on debugger mode
Goals
It is working as well without debugger mode. But on debugger mode, we are getting error when try to create Realm object with schema parameters.
Expected Results
It should work like without debugger
Actual Results
Code Sample
Version of Realm and Tooling
- Realm JS SDK Version: 2.17.0
- React Native: 0.57.1
- Client OS: Android
- Which debugger for React Native: Chrome
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 18
- Comments: 32 (3 by maintainers)
It is related from last version of realm(v2.18.0). You should downgrade to 2.16.0. And dont forgot to check version number on package.json. It should be “realm”: “2.16.0” not “realm”: “ˆ2.16.0”. I lost 1 day for that 😤
After that, run this code for reset all packages;
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
I am still getting this error with realm v2.18.0
I’ve commented out the line 80 from “node_modules\realm\lib\browser\index.js”.
It had a very slow start (when debug is on) but it worked fine for me on v2.19.0.
@bmunkholm even in firefox same error. searching for alternatives with NoSQL and real time database.
Actually, I’ve downgraded to 2.16.0. I did it yesterday. I was suffering about last 2 weeks because of this. I’m working on two differents machines. Win and MacOS. (10 and High Sierra)