Module AppRegistry is not registered callable module (calling runApplication)

别说谁变了你拦得住时间么 提交于 2019-11-29 01:05:56

Just kill all node process and start npm server and run application:

Step1: run command killall -9 node

For windows users, run: taskkill /im node.exe

Run taskkill /f /im node.exe if the process still persists.

Step2: run command npm start --reset-cache

Step3: run command react-native run-ios OR react-native run-android

Closing the current Metro Bundler and restarting by resetting the cache worked for me

npm start -- --reset-cache

You should have this at the bottom of the index.ios.js file AppRegistry.registerComponent('Point', () => Point); and also import AppRegistry from react-native

I had this issue - it was odd because I reset my repo to a time when the app was working. The issue was with my simulator (iOS).

For me the solution was to

  1. kill the simulator program (quit)
  2. then - close the terminal window that is opened when simulator is ran (Metro Bundler) Image of my terminal window

I was using native base for my app here is link native base

and you can see there is no app registry like this

 AppRegistry.registerComponent('Point', () => Point) 

but i have to do this to run my app

Need to replace

.setJSMainModulePath("index") with .setJSMainModulePath("index.android")

For me, restarting my computer appears to be enough to clear this issue.

It's often required after I've switched between branches, or merged branches using git.

I am using Expo

In my case, I resolved the issue by adding the following code in app.json file

"expo":{
  ...
  "android": {
    "package": "com.mycompanyname.myappname
  }
}
fazeel haider
import { AppRegistry } from 'react-native';

AppRegistry.registerComponent('your app name',  () => point);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!