question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing Realm constructor - please ensure RealmReact framework is included!

See original GitHub issue

Hi, i have this error when add realm in my app.

import React, { Component } from 'react-native'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { Actions, Router, Reducer } from 'react-native-router-flux'
import { middleware as netInfo } from './Middleware/redux-middleware-react-native-netinfo'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'

import Realm from 'realm'

import * as reducers from './reducers'
import {checkConnection} from './actions/networkActions'
import Scenes from './Scenes'

const logger = createLogger()
const createStoreWithMiddleware = applyMiddleware(thunk, logger, netInfo)(createStore)
const reducer = combineReducers(reducers);
const store = createStoreWithMiddleware(reducer)
store.dispatch(checkConnection())

const reducerCreate = params=>{
  const defaultReducer = Reducer(params);
  return (state, action)=>{
    return defaultReducer(state, action);
  }
};

export default class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <Router createReducer={reducerCreate} scenes={Scenes} />
      </Provider>
    );
  }
}

schermata 2016-04-11 alle 12 19 38

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alaziercommented, Apr 11, 2016

Glad you got it working.

0reactions
sarovincommented, Apr 11, 2016

The output of rnpm is:

rnpm-link info Linking realm android dependency 
rnpm-link info Android module realm is already linked 
rnpm-link info Linking realm ios dependency 
rnpm-link info iOS module realm is already linked 

UPDATE: i have upgrade rnpm at 1.6.2 and now work…

Read more comments on GitHub >

github_iconTop Results From Across the Web

missing realm constructor - please ensure RealmReact ...
Same here on IOS. I linked the library by running "react-native link realm" and also checked if it is included in "Build Phases...
Read more >
Can't run Hello World React Native App - Missing Realm ...
When I do that (on device and on emulator), I get: Missing Realm constructor - please ensure RealmReact framework is included! I haven't...
Read more >
Missin Realm Constructor error - MongoDB
I use all the latest versions of React Native, Realm and Expo ... Verify that pod install has indeed included Realm and do...
Read more >
Build an Offline-First React Native Mobile App with Expo and ...
Prebuilding our Expo App. On save we'll find this error: Error: Missing Realm constructor. Did you run "pod install"? Please see https ...
Read more >
Developers - missing realm constructor - please ensure RealmReact ...
missing realm constructor - please ensure RealmReact framework is included · Javascript Required. Kindly enable Javascript. · Updates · Content Removed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found