是的,我已经阅读了这篇文章,但仍然不知道如何使它工作。
React Native - 端口8081已被使用,打包器要么没有运行,要么没有正确运行。Command /bin/sh失败,退出代码为2最初我是这样做的:
1. react-native init Hello
2. react-native run-ios
然后出现了“端口8081已经被占用”的错误提示。
我已经阅读了React文档,https://facebook.github.io/react-native/docs/troubleshooting.html
1. cannot kill the process using 8081, it keeps on coming back,
and i don't want to kill it
2. react-native start --port=8088
3. update node_modules/react-
native/React/React.xcodeproj/project.pbxproj file. Did it.
我应该在哪一步运行"react-native start --port=8088"呢?
顺便说一下,我是个普通工程师,但如果我在两个小时内无法运行第一个React Native样例,我就看不出它如何能够成功,这真的很烦人。
react-native start --port=1234
命令。只需运行react-native run-ios --port 1234
即可。 - Bagusflyer