9
votes

I am having issues with a shared github project our team is working on. I have been banging my head against this issue for about a week now without any luck.

The issue is a brand new clone that is working on my teams computers, will not run correctly on my computer. It throws the error, "Module AppRegistry is not a callable module". I am working on a ios project. I have deleted all folders and started again. I have created new users with various permissions and no luck.

Is there anything else that I am missing to try? Thanks!


Index.ios.js

const { AppRegistry } = require('react-native');
const setup = require('./app/setup');

AppRegistry.registerComponent('mobileapps', setup);

Setup.js

import App from './index';
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from './store';

const store = configureStore();

function setup() {
  class Root extends Component {
    render() {
      return (
        <Provider store={store}>
          <App />
        </Provider>
      );
    }
  }

  return Root;
}

module.exports = setup;
1
Did you double check your dependencies and versions? - Train
also check your exports statement in your index.ios.js and your imports - Train
Yes I have. I also just found out, that when I create a new project, as in like I run "react-native init newProject", I get the same error now. - gbland777
post your index.ios.js code - Train
Any reason why you're using a factory to define a class and return it? - JayGarcia

1 Answers

4
votes

Okay I figured it out after doing a new react-native init and installing each of my npm packages individually to see which one breaks. I found out it was RNCookies manager but the entire issue was I needed to run a rnpm link.