当8081端口被占用时,启动RN可能会出现失败,错误信息如下:
The following build commands failed:
PhaseScriptExecution Start\ Packager /Users/a/Library/Developer/Xcode/DerivedData/txclass-bdsiynvjryltljgiukvudjgphhnl/Build/Intermediates.noindex/txclass.build/Debug-iphonesimulator/txclass.build/Script-FD10A7F022414F080027D42C.sh
(1 failure)
执行lsof -i tcp:8081查看占用端口的进程, 再执行 kill -9 占用端口的进程pid 将该进程给关闭,随后重新启动即可。