Create React App, cannot import realm package


#1

Hi all,

I cannot import package in my create-react-app. I get an error before the pages load. Am I missing something here? I wish to continue the project with realm package on the web alongside with react-native.

I have started create-react-app and tried to install realm package with ‘npm --save realm’

Unfortunately, when I import realm object
import Realm from ‘realm’;

I get the error before the pages even load:

./node_modules/realm/lib/browser/index.js
Module not found: Can’t resolve ‘react-native’ in (my path)