Error:Metro Bundler can't listen on port 8081

1.控制台错误情况

 ERROR  Metro Bundler can't listen on port 8081

2.解决办法:kill 占用8081端口的其他应用

参考:https://facebook.github.io/react-native/docs/troubleshooting.html

a.找到占用端口的应用

$ sudo lsof -i :8081

b. kill (40247 是应用的 PID)

kill -9 40247

c. 然后执行

react-native start

猜你喜欢

转载自blog.csdn.net/Crazy_SunShine/article/details/80625120
今日推荐