react-native 初试,win下环境都搭不起来,神伤,求大神指点
发布于 8 年前 作者 moxiaobei2 11247 次浏览 来自 问答

node 5.4版本 npm install -g react-native-cli之后react-native -v显示react-native-cli: 0.1.10 react-native: n/a - not inside a React Native project directory, 之后初始项目react-native init myApp,之后显示成功,启动项目react-native start 启动不报错,模拟器react-native run-android出现红色弹出框,按网上提示加serverIP之后,控制台会有log,但是http://localhost:8081/index.android.bundle?platform=android出现TransformError,具体是:

TransformError: E:\nodejsproject\react\hello\node_modules\react-native\node_modules\react-transform-hmr\node_modules\react-proxy\node_mod ules\react-deep-force-update\lib\index.js: [BABEL] E:\nodejsproject\react\hello\node_modules\react-native\node_modules\react-transform-hmr\node_mo dules\react-proxy\node_modules\react-deep-force-update\lib\index.js: Unknown option: E:\nodejsproject\react\hello\node_modules\react-native\node_m odules\react-transform-hmr\node_modules\react-proxy\node_modules\react-deep-force-update.babelrc.stage 已经重新Init很多次了,也看不出有什么问题。求指点。

3 回复

删除\react-deep-force-update.babelrc 文件

@cgyqqcgy已经解决了哈,主要是代理问题,环境重新部署下就可以了。

@moxiaobei2 请问怎么解决的我也碰到了相同的问题

回到顶部