OrangeEvan
OrangeEvan

Reputation: 71

(react-native realm) undefined is not an object (evaluating '_realm.Realm.schemaVersion')

I use realm(0.13.2) before with nothing wrong. But when I update the plugin to realm(1.2.0),It happend:

undefined is not an object (evaluating '_realm.Realm.schemaVersion')

configureRealm
configure.js:14:19

and configure.js,line 14:

var next = Realm.schemaVersion(Realm.defaultPath);

What's wrong?

Upvotes: 2

Views: 1440

Answers (1)

OrangeEvan
OrangeEvan

Reputation: 71

I find that realm has default export. so,I just should change my import code

from import {Realm} from 'realm'; to import Realm from 'realm';

Upvotes: 4

Related Questions