The development server returned response error code: 500 in react-native

偶尔善良 提交于 2019-12-21 10:24:58

问题


I'm making react-native app with my frd. So I got the code my frd first made and I wanted to open my computer. I think I set everything and did tcp:8081 setting in dev menu. but I got error message after started react-native packager. I use real phone device.

Please help me.

[2016-11-25 17:13:55] <START> Initializing Packager
[2016-11-25 17:13:55] <START> Building in-memory fs for JavaScript
[2016-11-25 17:13:56] <END>   Building in-memory fs for JavaScript (1172ms)
[2016-11-25 17:14:00] <START> Building Haste Map
[2016-11-25 17:14:01] <END>   Building Haste Map (668ms)
[2016-11-25 17:14:01] <END>   Initializing Packager (5738ms)
[2016-11-25 17:14:26] <START> Requesting bundle  url: /index.android.bundle?platform=android&dev=true&hot=false&minify=false
[2016-11-25 17:14:26] <START> Transforming modules

回答1:


1:- close the Terminal. 2:- close the application in a device. And rebuild the application it will work.




回答2:


Searching for react-native __dev__ not define online brings back a lot of results and possible solutions.

Here is one which is quite popular:

     https://github.com/facebook/react-native/issues/7814#issuecomment-222975165
       - enter 'babel-preset-react-native' in my package.json - use this for reference:       https://www.npmjs.com/package/babel-preset-react-native



来源:https://stackoverflow.com/questions/40800516/the-development-server-returned-response-error-code-500-in-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!