Description
🐛 Bug Report
After I run the command "react-native run-android" the emulator shows a red screen returning Error code 500, then "Error: Unable to resolve module ./index
from C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts/.
: The module ./index
could not be found from `C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts" and severals of others.
To Reproduce
on prompt, run the commands:
react-native run-android
Expected Behavior
Open the first application without any issues.
Code Example
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false
Body:
<title>Error</title>Error: Unable to resolve module `./index` from `C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts/.`: The module `./index` could not be found from `C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts/.`. Indeed, none of these files exist:
* `C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
* `C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\react-native\scripts\index\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
at ModuleResolver.resolveDependency (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:163:15)
at ResolutionRequest.resolveDependency (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:52:18)
at DependencyGraph.resolveDependency (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\node-haste\DependencyGraph.js:283:16)
at C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\lib\transformHelpers.js:261:42
at Server.<anonymous> (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\Server.js:1038:41)
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\Server.js:99:24)
at _next (C:\Users\ricar\Desktop\PrimeiroProjeto\node_modules\metro\src\Server.js:119:9)
processBundleResult
BundleDownloader.java:296
access$200
BundleDownloader.java:37
onResponse
BundleDownloader.java:174
execute
RealCall.java:206
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1113
run
ThreadPoolExecutor.java:588
run
Thread.java:818
Environment
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 4.25 GB / 7.91 GB
Binaries:
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842