Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error code: 500 #24172

Closed
ricardo-ivanov opened this issue Mar 27, 2019 · 6 comments
Closed

Error code: 500 #24172

ricardo-ivanov opened this issue Mar 27, 2019 · 6 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@ricardo-ivanov
Copy link

ricardo-ivanov commented Mar 27, 2019

🐛 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
Capture

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

@samad324
Copy link

Yes, I have the same issue, I've just init a new project and just hit react-native run-android and got the same error.

@samad324
Copy link

but my old projects are working fine!

@samad324
Copy link

samad324 commented Mar 28, 2019

my issue was resolved my downgrade react and react-native version to:
"react": "16.6.3",
"react-native": "0.58.4"

@ssaar
Copy link

ssaar commented Mar 28, 2019

I have the same issue, it happens with both iOS and Android. It can be gotten around by killing the metro bundler then running react-native start. This happened after upgrade from .58 to .59.1

react-native info
info
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 1.03 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 27, 28
Build Tools: 28.0.3
System Images: android-25 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.59.1 => 0.59.1
npmGlobalPackages:
react-native-cli: 2.0.1

@kelset
Copy link
Contributor

kelset commented Mar 28, 2019

Duplicate of #24112

@kelset kelset marked this as a duplicate of #24112 Mar 28, 2019
@kelset kelset closed this as completed Mar 28, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 28, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 28, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants