Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

The development server returned response error code: 500 #721

Closed
hdamis opened this issue Jul 29, 2018 · 26 comments
Closed

The development server returned response error code: 500 #721

hdamis opened this issue Jul 29, 2018 · 26 comments
Labels
moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now.

Comments

@hdamis
Copy link

hdamis commented Jul 29, 2018

Hi,
I am new to react-native and I installed all required program as https://facebook.github.io/react-native/docs/getting-started.html
but when I create a new project as the follwoing:

react-native init AwesomeProject
cd AwesomeProject
react-native run-android
I got an error as the below image
react-native

windows 10
jdk8
node version v10.7.0
react-native-cli: 2.0.1

I tried everything recommended on internet, nothing is working. I am totally stuck on it. Please help.

@lemontizz
Copy link

same problem

@hdamis
Copy link
Author

hdamis commented Aug 3, 2018

it is a bug in react-native version 56.0
so resolve this problem you have to edit package.josn and change the version of react native as below:
"react-native": "^0.55.4",
and in android\app\build.gradle add
dependencies {

...
compile ("com.facebook.react:react-native:0.55.4") { force = true }
}

delete node_modules

npm install --save-dev babel-preset-react-native@2.1.0
npm install
Hope this will help you ….

@bradrar
Copy link

bradrar commented Aug 3, 2018

@hdamis I tried your solution but it doesn;t work.

here is what it says after I run react-native run-android

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
Could not find com.facebook.react:react-native:0.55.4.
Required by:
project :app
Could not find com.facebook.react:react-native:0.55.4.
Required by:
project :app

@isaacghorbani
Copy link

edite app.json to solve this problem:
{
"expo": {
"sdkVersion": "23.0.0" // your device android sdk ver!
}
}

@NicWickman
Copy link

I'm having the same issue, and also the same issue following hdamis' advice. Isaac, your suggestion does not work for me.

@bradrar
Copy link

bradrar commented Aug 7, 2018

Isaac, still not working. but thanks for commenting.

@NicWickman
Copy link

bradrar, I am on to new errors now but I just resolved this particular 500 error in the following way:

delete node_modules folder
clean npm cache
change react-native version to 0.55.4 in packages.json
npm install

@hermanomark
Copy link

hermanomark commented Aug 12, 2018

I'm having the same issue tried solution above still not working!

@NicWickman
Copy link

NicWickman commented Aug 12, 2018 via email

@hermanomark
Copy link

I found a workaroud from here: #401

  • Delete node_modules folder
  • In package.json, changed react-native version "react-native": "0.55.2" and babel "babel-preset-react-native": "4"
  • Run yarn install or npm install
  • Finally run react-native run-android

@blank9987
Copy link

hermanomark thanks bro.... its working...

@behzadkhodapanah
Copy link

behzadkhodapanah commented Aug 19, 2018

hello , fast solution is :
1 - delete node_modules folder
2 - edit package json : react-native version to "55.4" or "55.2" and babel-preset-react-native to "4.0.0"
3 - run npm install or yarn install command
4 - you're done 👍

@jerrychong25
Copy link

@hermanomark methods works for me, thanks a lot!

@MuhammadUsman786786
Copy link

@qweasdzxc23 works for me, Thanks alot!

@osnersanchez
Copy link

I had the same problem, and solve it with the suggested by @qweasdzxc23, but ¿I would like to know why this problem occurs and what is the reason for this solution?

@ZubairAkber
Copy link

Thanks @qweasdzxc23 @hermanomark @NicWickman your solution really works

@venkataramanaj
Copy link

I am also getting same issue, I tried many ways, but didn't work

@AllStackDev1
Copy link

But why should we do all this.. can't the react guy fix this issues from their end also react v 56.0 is having issues too

@NicWickman
Copy link

NicWickman commented Sep 13, 2018 via email

@phprad
Copy link

phprad commented Sep 20, 2018

The issue still persists in React 57.

@kevinzhangftw
Copy link

lol, just tried build this on 0.57 still fails

@mrkmg
Copy link

mrkmg commented Sep 24, 2018

Also getting this error with 0.57

@cocoa-rum
Copy link

cocoa-rum commented Sep 27, 2018

@phprad , @kevinzhangftw , @mrkmg
I don't know, Have You found the solution already, but try this if You still need it
facebook/react-native#21310

It's work for me

@juliocmalvares
Copy link

I tried all the ways you said. The error still persists.

@jonatslab
Copy link

I tried all the ways you said. The error still persists.

@juliocmalvares if all the solutions didn't work for you. You can initialized a new project with a specific version => $ react-native init newproject --version react-native@0.55.4

@juliocmalvares
Copy link

@J0nats thks, bro !

@fson fson added moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. and removed moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now. labels Oct 3, 2018
@fson fson closed this as completed Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moving-to-expo-cli The issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now.
Projects
None yet
Development

No branches or pull requests