mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
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
This commit is contained in:
parent
88655001e3
commit
95972cfd08
@ -122,7 +122,7 @@ function _server(argv, config, resolve, reject) {
|
||||
}
|
||||
console.log('\nSee', chalk.underline('http://facebook.github.io/react-native/docs/troubleshooting.html'));
|
||||
console.log('for common problems and solutions.');
|
||||
reject();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// TODO: remove once we deprecate this arg
|
||||
|
Loading…
x
Reference in New Issue
Block a user