Reputation: 187
I installed react-native as per the instructions but on
$npm start
I the following error.
ERROR Metro Bundler can't listen on port 8081
Loading dependency graph...
npm ERR! Darwin 17.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! [email protected] start: `node node_modules/react-native/local-
cli/cli.js start`
I guess there is some sort of dependency or conflict, does anyone know how I can figure out what it is?
Upvotes: 2
Views: 4086
Reputation: 3674
Run the following command to find id of the process which is using port 8081
sudo lsof -i :8081
Then run the following to terminate process:
kill -9 23583
Upvotes: 8
Reputation: 1374
i guess port 8081 is used somewhere try to kill port and run again
Find (and kill) process locking port 3000 on Mac
Upvotes: 2