Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module AppRegistry is not registered callable module (calling runApplication)

I am using native base for making app in react-native. I am new to both things. When I run the app It gives me this error:

enter image description here

Here is my code:

export default class Point extends Component {      render() {         return (             <Container>                 <Header>                     <Left>                         <Button transparent>                             <Icon name='menu' />                         </Button>                     </Left>                     <Body>                         <Title>Header</Title>                     </Body>                     <Right />                 </Header>             </Container>         );     } } 

Here is the screenshot of my versions

enter image description here

and nativebase version is "native-base": "^2.1.2"

like image 431
Asad Avatar asked Apr 25 '17 07:04

Asad


People also ask

Is not a registered callable module calling runApplication?

ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

What is AppRegistry Why is it required early in require sequence?

AppRegistry should be required early in the require sequence to make sure the JS execution environment is setup before other modules are required.


2 Answers

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

like image 186
Brijesh Shiroya Avatar answered Sep 20 '22 10:09

Brijesh Shiroya


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

npm start -- --reset-cache 
like image 24
Chetan J Rao Avatar answered Sep 19 '22 10:09

Chetan J Rao