React Native - Port 8081 already in use, packager is either not running or not running correctly Command /bin/sh failed with exit code 2

后端 未结 12 1195
眼角桃花
眼角桃花 2020-12-13 11:01

I\'m trying to get up and running with React Native and I am seeing the message below in Xcode:

Port 8081 already in use, packager is either not running

12条回答
  •  天涯浪人
    2020-12-13 11:13

    If you do lsof -n -i4TCP:8081 as recommended in Facebook's troubleshooting page and get an empty result, try again using sudo lsof -n -i4TCP:8081.

    In my case, it turns out McAfee anti-virus software is running process that listens on that port. Killing that process (I know, I know!) fixed the problem.

提交回复
热议问题