diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 37428ecbb..001ddbb6e 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -16,7 +16,7 @@ The React Native packager runs on port 8081. If another process is already using Run the following command on a Mac to find the id for the process that is listening on port 8081: -`$ sudo lsof -n -i4TCP:8081 | grep LISTEN` +`$ sudo lsof -i :8081` Then run the following to terminate the process: diff --git a/local-cli/server/server.js b/local-cli/server/server.js index b7f3a64ab..35142e7b3 100644 --- a/local-cli/server/server.js +++ b/local-cli/server/server.js @@ -50,8 +50,8 @@ function server(argv, config, args) { ); console.log('Most likely another process is already using this port'); console.log('Run the following command to find out which process:'); - console.log('\n ', chalk.bold('lsof -n -i4TCP:' + args.port), '\n'); - console.log('You can either shut down the other process:'); + console.log('\n ', chalk.bold('lsof -i :' + args.port), '\n'); + console.log('Then, you can either shut down the other process:'); console.log('\n ', chalk.bold('kill -9 '), '\n'); console.log('or run packager on different port.'); } else {