开发服务器返回响应错误代码500-react native-./configs/main [英] the development server returned response error code 500 - react native - ./configs/main

查看:56
本文介绍了开发服务器返回响应错误代码500-react native-./configs/main的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试制作 hello-world 示例时,出现此错误:
react-native初始化hello_worldcd hello_worldreact-native run-android

I got this error when i tried to make hello-world sample:
react-native init hello_world cd hello_world react-native run-android

即使我跑步:
npm install -g react-native-git-upgradereact-native-git-upgrade
我在推荐行控制台上遇到了同样的错误.

Even when I ran:
npm install -g react-native-git-upgrade react-native-git-upgrade
I got same error on commend line console.

我已经搜索并尝试了许多解决方案,但是它似乎不起作用:示例:
* 升级本机
*使用watchman watchman watch-del-all
*删除 node_modules
*清理缓存 npm缓存清理 npm start---reset-cache

I've searched and tried many solutions but it doesn't seem to work: Example:
* upgrade react-native
* using watchman watchman watch-del-all
* remove node_modules
* clean cache npm cache cleanor npm start -- --reset-cache

操作:第8窗口
react-native-cli:2.0.1
react-native:0.44.2(也尝试过0.47.1)
Android:模拟器Nexus5X

Operation: Window 8
react-native-cli: 2.0.1
react-native: 0.44.2 ( tried 0.47.1 too )
Android: Simulator Nexus5X

谢谢大家!

推荐答案

删除 node_modules 中的 babel-preset-react-native 文件夹,然后安装旧版本2.1.0该库的 npm install babel-preset-react-native@2.1.0 --save-dev .

Delete babel-preset-react-native folder inside node_modules and then install older version 2.1.0 of this library with npm install babel-preset-react-native@2.1.0 --save-dev.

这篇关于开发服务器返回响应错误代码500-react native-./configs/main的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆