create-react-native-app icon indicating copy to clipboard operation
create-react-native-app copied to clipboard

The development server returned response error code: 500

Open hdamis opened this issue 8 years ago • 26 comments

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.

hdamis avatar Jul 29 '18 19:07 hdamis

same problem

lemontizz avatar Aug 03 '18 02:08 lemontizz

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 [email protected] npm install Hope this will help you ….

hdamis avatar Aug 03 '18 12:08 hdamis

@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

bradrar avatar Aug 03 '18 17:08 bradrar

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

isaacghorbani avatar Aug 07 '18 08:08 isaacghorbani

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

NicWickman avatar Aug 07 '18 08:08 NicWickman

Isaac, still not working. but thanks for commenting.

bradrar avatar Aug 07 '18 16:08 bradrar

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

NicWickman avatar Aug 07 '18 19:08 NicWickman

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

hermanomark avatar Aug 12 '18 06:08 hermanomark

This looks like an ongoing issue. I'm avoiding it by now for running a react project initialized on 0.55.4

On Sat, Aug 11, 2018, 11:52 PM Mark Hermano, [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/react-community/create-react-native-app/issues/721#issuecomment-412322749, or mute the thread https://github.com/notifications/unsubscribe-auth/ASZsATg-5A-Oqp10luZBpI6u8l8O3Wc6ks5uP9DGgaJpZM4VliVe .

NicWickman avatar Aug 12 '18 07:08 NicWickman

I found a workaroud from here: https://github.com/react-community/create-react-native-app/issues/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

hermanomark avatar Aug 12 '18 16:08 hermanomark

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

blank9987 avatar Aug 12 '18 21:08 blank9987

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 👍

behzadkhodapanah avatar Aug 19 '18 20:08 behzadkhodapanah

@hermanomark methods works for me, thanks a lot!

jerrychong25 avatar Aug 25 '18 10:08 jerrychong25

@qweasdzxc23 works for me, Thanks alot!

MuhammadUsman786786 avatar Aug 27 '18 21:08 MuhammadUsman786786

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?

osnersanchez avatar Sep 08 '18 22:09 osnersanchez

Thanks @qweasdzxc23 @hermanomark @NicWickman your solution really works

ZubairAkber avatar Sep 11 '18 11:09 ZubairAkber

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

venkataramanaj avatar Sep 12 '18 05:09 venkataramanaj

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

AllStackDev1 avatar Sep 13 '18 10:09 AllStackDev1

React 57 is supposed to fix the issue, but I'm unwilling to risk updating to find out.

On Thu, Sep 13, 2018, 3:09 AM Chinedu Ekene Okpala, < [email protected]> wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-community/create-react-native-app/issues/721#issuecomment-420955254, or mute the thread https://github.com/notifications/unsubscribe-auth/ASZsATIIPDV7uFCLaAiyWKf0OvWQuVy5ks5uai7egaJpZM4VliVe .

NicWickman avatar Sep 13 '18 16:09 NicWickman

The issue still persists in React 57.

phprad avatar Sep 20 '18 16:09 phprad