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 samassango opened this issue 9 years ago • 40 comments

whatsapp image 2017-09-11 at 08 39 24

Description

I started experiencing this issue after change an expo version from 15.0.0 to 19.0.0

samassango avatar Sep 11 '17 07:09 samassango

I guess maybe you're using this lib: https://github.com/GeekyAnts/NativeBase/issues/24

anyhow the issue is related to react-native version changes and some code (either yours or a library) depending on some private code in react-native that changed

brentvatne avatar Sep 13 '17 16:09 brentvatne

I managed to solve this error The cause of this error is the changes of files location made in react-native dependency which other libraries like native-base point to.

To solve it you need to view the mentioned file and change the file location to the correct location.

samassango avatar Sep 15 '17 12:09 samassango

Sorry but @samassango could you please explain a little bit further.

izzateesafia avatar Oct 06 '17 13:10 izzateesafia

@izzateesafia Okay this issue occurs in node_modules meaning it's not your code but its some of the dependence which had changed files location example: If we have modules/components/js/btn.js in a certain library, and it happen that another library use that library as one of it's dependence, then the used library decide to move the change btn.js to button/btn.js. if another app use both dependence this issue will occur. What you need to do is find the correct file location and update the file which can't resolve the previous location with the correct file location. Then its gonna work. Or Just implement expo 20.0.0 sdkversion 20.0.0, react-native 0.47.0, and react^16.0.0-alpha.12 then you won't experience that issue.

samassango avatar Oct 06 '17 14:10 samassango

For me this error was resolved running yarn in the project folder. The cause may have been due to the fact that I'd switched branches and some of the packages were not installed.

guarani avatar Oct 30 '17 00:10 guarani

@guarani your solution worked for me,thank you

bethwelt avatar Nov 30 '17 12:11 bethwelt

Be aware if you have an old metro bundler instance running, you should try to restart it.

rimiti avatar Mar 21 '18 17:03 rimiti

for my case i chenged node_module folder in another folder and run it.
that was reason for this issue

arash-hacker avatar Apr 22 '18 08:04 arash-hacker

One of the reasons why I was having this error was because I imported 'react-native' library twice.

import { View, Text, ActivityIndicator } from "react-native"; import { View, Text, ActivityIndicator, TouchableOpacity, StyleSheet } from "react-native";

I don't know If this can really cause this problem but removing the redundant line of import solved this issue for me.

thakursaurabh1998 avatar Jun 28 '18 20:06 thakursaurabh1998

restarting the metro bundler works!

Navithahk avatar Jul 11 '18 20:07 Navithahk

screenshot_2018-07-13-17-57-14-241_com awesomeproject this is my first app and i got this error .i am using -g react-native-cli

kishanmahor avatar Jul 13 '18 12:07 kishanmahor

I also have this issue :(

mazhardev avatar Jul 16 '18 07:07 mazhardev

Try run npm start and react-native run-android. Maybe your Metro Bundler isn't started.

rodrigos0ares avatar Jul 17 '18 13:07 rodrigos0ares

Expected Output

Running App.

Sets followed:

npm -g install react-native
npm -g install socks
npm -g install react-native-cli

cd /project-directory
react-native init <projectname>

cd projectname

-- Start Android Studio - Run Emulator (API 23) --

react-native run-android

Output: native-error

Other Info:

react-native -v
react-native-cli: 2.0.1
react-native: 0.56.0
npm -v
5.6.0

node -v
v8.11.3

On Windows 10 Pro - 64 Bit

karmicdice avatar Jul 24 '18 06:07 karmicdice

first delete node_modules folder and in package.json change react-native version "react-native": "0.55.2", and babel "babel-preset-react-native": "4", after that run yarn install or npm install and run its work fine for me.

On 24 July 2018 at 11:40, Karma Dice [email protected] wrote:

Expected Output

Running App.

Sets followed:

npm -g install react-native npm -g install socks npm -g install react-native-cli

cd /project-directory react-native init

cd projectname

-- Start Android Studio - Run Emulator (API 23) --

react-native run-android

Output: [image: native-error] https://user-images.githubusercontent.com/3824371/43119992-3ff0ce2e-8f36-11e8-8c42-c6cd74d7f5d2.png

— 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/401#issuecomment-407292369, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWEm9ADbFdJfcFlUz-3aA7sK0cl9osks5uJrpFgaJpZM4PSuo1 .

kishanmahor avatar Jul 24 '18 07:07 kishanmahor

Kish that's perfect mate. Thanks a bunch.

EugeneRaynerNZ avatar Jul 26 '18 00:07 EugeneRaynerNZ

The horror of Android on windows is real. Same issue, metro bundler seems to be fine but issue persists. Time for some tea.

MondeLionel avatar Jul 29 '18 18:07 MondeLionel

Thanks a lot @kishanmahor !

psatler avatar Aug 01 '18 23:08 psatler

React native on windows seems to be broken, and Kishanmahor workaround to return to an older vesion of react native seems to be the way to make it work.

As a temporary workaround works, but its not something that makes me feel comfortable with react native.

Edit: Seems to be related to https://github.com/facebook/react-native/issues/20353

edoantonioco avatar Aug 07 '18 16:08 edoantonioco

@rcsoares Metro Builder was running, but having the same issue for the sample starting app in react Please don't mind, I'm a newbie in react-native

prasad456 avatar Aug 08 '18 12:08 prasad456