It is getting error on debugger mode: constructor must be of type 'function'


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.

import Realm from ‘realm’;

class Todo extends Realm.Object {}
Todo.schema = {
name: ‘Todo’,
properties: {
done: {type: ‘bool’, default: false},
text: ‘string’,

class TodoList extends Realm.Object {}
TodoList.schema = {
name: ‘TodoList’,
properties: {
name: ‘string’,
creationDate: ‘date’,
items: {type: ‘list’, objectType: ‘Todo’},

export default new Realm({schema: [Todo, TodoList]});


Error: _constructor must be of type ‘function’, got (undefined)
at sendRequest (rpc.js:263)
at Object.createRealm (rpc.js:62)
at new Realm (index.js:102)
at (extensions.js:110)
at eval (eval at (MetroClient.js:63), :29:22)
at tryCallTwo (core.js:45)
at doResolve (core.js:200)
at new Promise (core.js:66)
at insertNewConfig (eval at (MetroClient.js:63), :28:12)
at Object.SelectInstanceScreen._this.continueLogin [as onPress] (eval at (MetroClient.js:63), :74:37)

Realm JS SDK Version: 2.17.0
React Native: 0.57.1