React Native Module AppRegistry不是注册的可调用模块 [英] React Native Module AppRegistry is not a registered callable module

查看:2351
本文介绍了React Native Module AppRegistry不是注册的可调用模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队正在处理一个共享的github项目时遇到问题.大约一个星期以来,我一直在努力解决这个问题,但没有任何运气.

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.

问题是我的团队计算机上正在工作的全新克隆,无法在我的计算机上正确运行.它引发错误,"Module AppRegistry不是可调用模块".我正在做一个ios项目.我已删除所有文件夹,然后重新开始.我创建了具有各种权限并且没有运气的新用户.

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

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;

推荐答案

好吧,在执行新的react-native初始化并单独安装每个npm软件包以查看哪个中断后,我弄清楚了.我发现它是RNCookies经理,但是整个问题是我需要运行rnpm link.

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.

这篇关于React Native Module AppRegistry不是注册的可调用模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆