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

Cannot find entry file index.android.js in any of the roots #14386

Closed
rushabhmakwana-multidots opened this issue Jun 8, 2017 · 29 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@rushabhmakwana-multidots

screen shot 2017-06-08 at 1 05 32 pm

@coma
Copy link

coma commented Jun 8, 2017

I'm getting this too on a freshly created app (react-native init foo) using react-native-cli 2.0.1 on OSx.

@rushabhmakwana-multidots
Copy link
Author

@coma Same here.

@coma
Copy link

coma commented Jun 8, 2017

The bundling process is failing somehow...

@rushabhmakwana-multidots
Copy link
Author

Yup..waiting for an expert to help here.

@thomaschauffour
Copy link

Same problem since upgrade react native 0.44 to 0.45

@engladgut
Copy link

react-native-git-upgrade 0.44.0

I know this not the answer for 0.45 but this solved all my problem like yours or this one -> 14209

I think I will stay at 0.44.0 for now. 0.44.1~3? Didn't work for me.

@coma
Copy link

coma commented Jun 8, 2017

Yupe, after initing a new app, just downgraded to react-native@0.44.2 and it's working now...

@aramiscubillo
Copy link

Yeap, downgraded to 0.44.0 and works now. In cause somebody doesn't know how to downgrade react, you need to install: https://github.com/facebook/react-native/tree/master/react-native-git-upgrade

@ngtranthanhtoan
Copy link

Me too get the same. Hope someone help

@GetSource1234
Copy link

Got the same issue.

@cricketnest
Copy link

Same issue.

@juhasuni
Copy link

juhasuni commented Jun 8, 2017

The same issue occurred to me after upgrading from 0.44. In my case react-native start --reset-cache was the key for resolving the issue.

After that I had to do some other changes to codebase. I had import ... from 'immutable'; statement, which I removed since I don't need immutable and it was not in my package.json.

I was also using id prop with some views, which I needed to rename, since RN was throwing me an error with registering a root view with explicit id prop or something.

Hope this helps someone.

@3gcodes
Copy link

3gcodes commented Jun 8, 2017

Also having this problem. Downgrading works, as suggested. But creating brand new app with latest react-native-cli gives the "Cannot find entry file..." error.

@Benouzef
Copy link

Benouzef commented Jun 8, 2017

Same problem since upgrade react native 0.44 to 0.45

@florinpop17
Copy link

+1

@fbyn
Copy link

fbyn commented Jun 8, 2017

Same problem with 0.45

@cgoudouris
Copy link

+1

@ggcaponetto
Copy link

react-native start --reset-cache seems to fix only the next start. Killing the packager process and running react-native run-android leads to the same problem, again.

@pbailey
Copy link

pbailey commented Jun 8, 2017

+1

@ggcaponetto
Copy link

0.45 seems to have a whole different project structure and entry point. The docs just got updated btw. The new entry point seems to be App.js, placed on the root.

@3gcodes
Copy link

3gcodes commented Jun 8, 2017

@ggcaponetto what? I don't see a new project structure. Are you saying that react-native-cli isn't generating the appropriate project structure and that could be the issue?

@hramos
Copy link
Contributor

hramos commented Jun 8, 2017

@ggcaponetto that is only the case when a new project is created using create-react-native-app. The behavior of react-native init should remain the same.

@ggcaponetto
Copy link

You are right, sorry to have brought confusion.

@sonikro
Copy link

sonikro commented Jun 8, 2017

When running react-native run-android on React-native 0.45, the packager is looking for JS files in \Project\node_modules\react-native\packager. That's why It's not finding the index.android.js file.

If I use react-native start, the packager will start looking for JS files in the correct place (\Project).

@samartha-kar23
Copy link

The fix which seem to work well is upgrading your project to the current version 0.45.
You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:

PS- If you have installed additional packages like react-navigator from npm you need to reinstall them again.
now as @sonikro mentioned use react-native start and reload.

  • If you are getting Application not registered error, you need to kill the old packager instance by:
    react-native start --reset-cache

@3gcodes
Copy link

3gcodes commented Jun 8, 2017

@samartha-kar23 So I need to upgrade a project I just created from scratch? That's not a fix. A brand new react-native init App should work; but doesn't.

@AVBelousov
Copy link

In first console window, from project folder run:
npm start --root .
(run packager manually with right root)

In second console window, from project folder run:
react-native run-android

@hramos
Copy link
Contributor

hramos commented Jun 8, 2017

Closing as duplicate of #14246.

@hramos hramos closed this as completed Jun 8, 2017
@rushabhmakwana-multidots
Copy link
Author

"react-native init YourAppName" creates an application with the react native version 0.45.0 and that creates the problem.
So I create new app with the specified version of react-native via "react-native init --version="version_number" MyFirstApp" command i.e "react-native init --version="0.44.2" MyFirstApp" and that solves my problem.

@facebook facebook locked and limited conversation to collaborators Jun 9, 2017
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests