react-native/local-cli
Adrov Igor 95972cfd08 fix error handling in packager
Summary: Currently on error I have following output:
```
 ERROR  Packager can't listen on port 8081
Most likely another process is already using this port
Run the following command to find out which process:

   lsof -n -i4TCP:8081

You can either shut down the other process:

   kill -9 <PID>

or run packager on different port.

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
/Users/nucleartux/Work/projects/react-native/local-cli/server/server.js:90
    if (error.code === 'EADDRINUSE') {
             ^

TypeError: Cannot read property 'code' of undefined
    at process.<anonymous> (/Users/nucleartux/Work/projects/react-native/local-cli/server/server.js:104:14)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
    at process._fatalException (node.js:211:26)
```
Closes https://github.com/facebook/react-native/pull/3765

Reviewed By: svcscm

Differential Revision: D2595537

Pulled By: martinbigio

fb-gh-sync-id: e11ec2e6e8794bf5fe7570e27cd327777d8b300c
2015-10-29 08:59:02 -07:00
..
__mocks__ Fix more tests 2015-09-16 13:05:30 -07:00
__tests__ Generate bundle and assets when building via Xcode 2015-10-21 18:44:27 -07:00
bundle Add option to indicate bundle encoding 2015-10-28 13:20:28 -07:00
dependencies Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
generate Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
generator add upgrade cli command 2015-10-23 03:37:28 -07:00
generator-android add upgrade cli command 2015-10-23 03:37:28 -07:00
generator-ios Generate bundle and assets when building via Xcode 2015-10-21 18:44:27 -07:00
library Introduce react-native link 2015-10-27 11:22:28 -07:00
runAndroid Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
server fix error handling in packager 2015-10-29 08:59:02 -07:00
upgrade Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
util Revert "Add folders to attempt to unblock sync" 2015-10-26 22:48:10 +00:00
cli.js Introduce react-native link 2015-10-27 11:22:28 -07:00
default.config.js Use default asset roots on `default.config.js` 2015-10-23 18:49:25 -07:00
generate-android.js Add license headers to local-cli 2015-10-20 09:55:21 -07:00
generator-utils.js Add license headers to local-cli 2015-10-20 09:55:21 -07:00
setup_env.bat Fix comments on .bat file 2015-10-28 21:36:07 -04:00
setup_env.sh Start packager through cli 2015-10-21 03:03:59 -07:00
wrong-react-native.js Bring back global cli module check 2015-10-26 15:36:29 -07:00