Skip to content

Cannot find entry file index.ios.js [index.android.js] in any of the roots #14246

Closed
@MyTotoro

Description

@MyTotoro

[edit #2: this is now fixed as of 0.45.1 and 0.46.0-rc.2 - @hramos]

[edit: scroll down for additional details - @hramos]

Description

Recently upgrade to RN 0.45 from 0.42 (I was hit with #14225 and I figured I might as well spend the time migrating)

Error in Bundler:

error: bundling: Error
    at DependencyGraph._getAbsolutePath (/Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:280:11)
    at DependencyGraph.getDependencies (/Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:218:26)
    at Resolver.getDependencies (/Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/Resolver/index.js:107:27)
    at /Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/Bundler/index.js:591:37
    at Generator.next (<anonymous>)
    at step (/Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/Bundler/index.js:12:445)
    at /Users/mytotoro/Desktop/app/node_modules/react-native/packager/src/Bundler/index.js:12:605
    at process._tickCallback (internal/process/next_tick.js:109:7)
Bundling `index.android.js`  0.0% (0/1), failed.

and red screen showing

Response error 404, Cannot find entry file index.android.js in any of the roots: [\"/Users/mytotoro/desktop/app/node_modules/react-native/packager\"]

With NotFoundError

Looking for JS files in
   /Users/mytotoro/Desktop/app/node_modules/react-native/packager 


React packager ready.

Reproduction Steps and Sample Code

"react": "^16.0.0-alpha.12",
"react-native": "^0.45.0-rc.2",

Mac: 10.12.4
node: v7.10.0
npm: 4.6.1

I run react-native run-android from the root directory of my project as I have always been doing:

total 456
-rw-r--r--    1 mytotoro  staff     175 Apr  7 23:36 index.ios.js
-rw-r--r--    1 mytotoro  staff     175 Apr  7 23:36 index.android.js
drwxr-xr-x    7 mytotoro  staff     238 Apr  7 23:36 Tests
-rw-r--r--    1 mytotoro  staff    2113 Apr  7 23:36 README.md
drwxr-xr-x    6 mytotoro  staff     204 Apr  7 23:37 ignite
drwxr-xr-x   15 mytotoro  staff     510 Apr  7 23:38 App
-rw-r--r--    1 mytotoro  staff  216323 Apr  7 23:39 yarn.lock
drwxr-xr-x   15 mytotoro  staff     510 May 29 13:42 android
-rw-r--r--    1 mytotoro  staff    3888 May 29 14:18 package.json

This issue comes up for iOS as well (I run on device through xcode) but the offending file is index.ios.js

[edit: adding duplicates -@hramos]

Duplicates

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions