react-native: Dev mode trying to find /index.android.bundle (Unable to resolve module `./index.android` from ``)
Hello,
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 16
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