react-native: Cannot find entry file index.android.js in any of the roots
PC: Windows 7 Node: v4.2.4 Python: 2.7.10 npm: 2.14.12 Proxy: 127.0.0.1:8087 react-native: 0.1.7
When i run the command react-native start
,then browse in the chrome with the url: http://localhost:8081/index.android.bundle?platform=android&dev=true
it shows error message as follows:
{
message: "Cannot find entry file index.android.js in any of the roots: ["D:\\workspace\\snowdream\\git\\react_native_helloworld"]",
name: "NotFoundError",
type: "NotFoundError",
status: 404,
errors: [
{ }
]
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (2 by maintainers)
I has the same problem too. fixed founction: 1、react-native start 2、react-native run-android will fix the problem.
It’s 2017, and this issue
still
persists. Worst experience as first timer like me. Have been looking for solution, but no real working solution yet. Happens on two computers, two operating systems each (windows and linux), all failed.I has the same problem too.But fixed after I edit the file index.android.js . I found before i edit index.android.js ,in file fastfs.js
_getFile(filePath) { filePath = path.normalize(filePath); if (!hasOwn.call(this._fastPaths, filePath)) { this._fastPaths[filePath] = this._getAndAssertRoot(filePath).getFileFromPath(filePath); }
}
“hasOwn.call(this._fastPaths, filePath)” return true,but code “this._fastPaths[filePath]” return undefined。
Hey snowdream, thanks for reporting this issue!
React Native, as you’ve probably heard, is getting really popular and truth is we’re getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-native
or for more real time interactions, ask on Discord in the #react-native channel.i also assume you have tried:
node node_modules/react-native/local-cli/cli.js start --reset-cache
When I eject mobile hard disk everything is ok.But i do not know why.
@stoffern Now it’s working. Here’s how. After asking my friend and he also struggles to find out why, who couldn’t help to make it work after all. After he gave up, at the end, I then check all the version: os (windows 10, same), node (me: 6.11.0, him: 6.10.3), npm (3.10.10, same). I find we all use the same version except node js. I use latest node js v6.11.0 while he uses 6.10.3. So I uninstall nodejs, and install version 6.10.3, and try to build new project, and turns out it works. So for me, node js is the problem. v6.11.0 definitely not working for me.