react-native/local-cli/server
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
..
middleware Move files from `packager/` to `local-cli` 2015-10-26 15:38:14 -07:00
util Move files from `packager/` to `local-cli` 2015-10-26 15:38:14 -07:00
checkNodeVersion.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
formatBanner.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
runServer.js Move files from `packager/` to `local-cli` 2015-10-26 15:38:14 -07:00
server.js fix error handling in packager 2015-10-29 08:59:02 -07:00