Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is index.js after eject in version 2.0.2 ? #771

Closed
ghost opened this issue Sep 22, 2018 · 4 comments
Closed

where is index.js after eject in version 2.0.2 ? #771

ghost opened this issue Sep 22, 2018 · 4 comments
Labels
moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now.

Comments

@ghost
Copy link

ghost commented Sep 22, 2018

hi, where is index.js after eject in version 2.0.2 ?

even i create it and then create the index.android.bundle it says Application [name] has not been registered.

failure to call AppRegistry.registerComponent

@Surezt22
Copy link

Even I don't find the index.js file in the latest version after I run Eject.

@caseychoiniere
Copy link

caseychoiniere commented Sep 25, 2018

Yes, this should be included in the eject documentation if it's no longer going to be generated by default.

@EVALIJANI Did you include the appropriate contents in index.js after creating it in your project root?

This worked for me.

import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('your_app_name_here', () => App);

@ghost
Copy link
Author

ghost commented Sep 26, 2018

Yes, this should be included in the eject documentation if it's no longer going to be generated by default.

@EVALIJANI Did you include the appropriate contents in index.js after creating it in your project root?

This worked for me.

import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('your_app_name_here', () => App);

no but for me gives this error: failure to call AppRegistry.registerComponent

@caseychoiniere
Copy link

@EVALIJANI If you have an index.js in your project root and it contains

import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('your_app_name_here', () => App);

with 'your_app_name_here' changed to your appropriate app name then you should check the solutions in this stack overflow post https://stackoverflow.com/questions/35449248/failure-to-call-appregistry-registercomponent

My guess is that you're not putting the proper app name in. This should match the name you used when ejecting.

@fson fson added moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. and removed moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. labels Oct 3, 2018
@fson fson closed this as completed Oct 3, 2018
@fson fson added moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. and removed moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. labels Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now.
Projects
None yet
Development

No branches or pull requests

3 participants