Dev mode trying to find /index.android.bundle (Unable to resolve module `./index.android` from ``)
See original GitHub issueHello,
I upgraded from RN 0.59.9 to 0.61.0.rc3.
On Android, when I compile the app (after yarn install and cleaning the Android project), I have a red crash error saying :
Error: Unable to resolve module `./index.android` from ``:
None of these files exist:
* index.android(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
* index.android/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
at ModuleResolver.resolveDependency (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
at ResolutionRequest.resolveDependency (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
at DependencyGraph.resolveDependency (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/node-haste/DependencyGraph.js:282:16)
at /Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/lib/transformHelpers.js:267:42
at Server.<anonymous> (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/Server.js:1088:41)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/Server.js:99:24)
at _next (/Users/jbchauvin1/Documents/Projets/Santoyamo/Cegedim/new/Mobile/app-dev/node_modules/metro/src/Server.js:119:9)
And my app/build.gradle :
project.ext.react = [
entryFile: "index.js",
bundleAssetName: "index.android.bundle",
bundleInDebug: false,
bundleInRelease: true,
enableHermes: false, // clean and rebuild if changing
]
React Native version: 0.61 RC 3
Steps To Reproduce
- react-native run-android
- Red crash error…
Describe what you expected to happen: I would like to see the Android app without any problems. That’s weird, I don’t understand why it’s trying to load the index.android.bundle file.
Thanks for the help
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:15
Top Results From Across the Web
Ask Question - Stack Overflow
It's throwing error because it's not able to find index.android file in your root directory of project , if you have index.ios in...
Read more >React Native: Unable to load script: index. android.bundle
Step 1: I am using React Native version 0.63.2 like below, and I want to build an android app by using Fastlane for...
Read more >Integration with Existing Apps - React Native
With a few steps, you can add new React Native based features, screens, views, etc. The specific steps are different depending on what...
Read more >Troubleshooting | React Navigation
If the module points to an npm package (i.e. the name of the module doesn't with ./ ), then it's probably due to...
Read more >Troubleshooting build errors and crashes - Expo Documentation
For example, you might see something like this on your Android builds: Terminal ... Metro encountered an error: Unable to resolve module ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi JB-CHAUVIN, Came across the exact same issue this morning, here is my steps to solve the issue
solution by @tsehiuming solve my problem. i missed out
in my MainApplication.java