liuhongjun719 / react-native-BabyHealth-

React native 创建的仿 “宝宝健康” app,实现Listview展示、收藏、跳到appstore、react-redux与redux-thunk的使用
85 stars 43 forks source link

项目运行报错 #2

Open bozaigao opened 7 years ago

bozaigao commented 7 years ago

ReactNative 0.30.0版本运行项目会报错:“SyntaxError:strict mode does not allow function declarations in a lexically nested statement.”不知道作者运行为什么是好的?有什么解决方法,各种方式都试玩了,比如把react-native升级到0.38.0又报新的错误

ysq1051838264 commented 7 years ago

@bozaigao 题主解决了没?我也遇到了同样的错误

bozaigao commented 7 years ago

@ysq1051838264 这个问题我解决了,我在网上逛了各大论坛然后将react版本改为15.4.0,react-native版本改为0.38,最后成功运行,希望能够帮到你

ysq1051838264 commented 7 years ago

@bozaigao 我按照你这个重新编译之后,出现 Got JS Exception: Error: Requiring unknown module "0".If you are sure the module is there, try restarting the packager or running "npm install".

bozaigao commented 7 years ago

@ysq1051838264 你把版本号改了还要把原来的raect和react-native删了重新npm i

ysq1051838264 commented 7 years ago

@bozaigao 我改成这样"react": "^15.3.1", "react-native": "^0.40.0",就没有报这个错了,但是了, 出现了500,你会出现500么?Exception in native call com.facebook.react.devsupport.DebugServerException: The development server returned response error code: 500 Body: {"type":"InternalError","message":"react-packager has encountered an internal error, please check your terminal error output for more details"} at com.facebook.react.devsupport.DevServerHelper$5.onResponse(DevServerHelper.java:323) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:833)

bozaigao commented 7 years ago

@ysq1051838264 这样吧我看了一下桌面之前的那个没有错误的项目我还没有删掉,你加我QQ:1054539528我把项目压缩了直接发你吧