mirror of
https://github.com/status-im/metro.git
synced 2025-02-28 02:30:29 +00:00
Updates from Tue 7 Apr
- [AdsManager] Correct back button functionality | Eric Vicenti - [ReactNative] Replace Backstack with BackAndroid | Eric Vicenti - [ReactNative] Better error message for EADDRINUSE | Alex Kotliarskyi - [ReactNative] npm install --save chalk | Alex Kotliarskyi - Removed redundant views and shadow views | Nick Lockwood - [ReactNative] Fix variable shadowing in RCTText | Tadeu Zagallo - [react-packager] check in image-size module | Amjad Masad - Refactored RCTLog and added facility to prepend extra data to the log message | Nick Lockwood - [ReactNative] Fix crash on image download | Tadeu Zagallo - [React Native] #WIP Modify RCTShadowText measure function to honor maxNumberOfLines property | Alex Akers - Add promise support to AsyncStorage | Spencer Ahrens - [ReactNative] Revert high-level Subscribable | Eric Vicenti - [ReactNative] wrong deprecated prop check in RCTConvert | Kevin Gozali - [ReactNative][MAdMan] Add type for image source, flowify AdsManagerObjectiveTypes | Philipp von Weitershausen
This commit is contained in:
parent
2a25eec53e
commit
0c6c300c0d
33
packager.js
33
packager.js
@ -23,6 +23,7 @@ if (!fs.existsSync(path.resolve(__dirname, '..', 'node_modules'))) {
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var chalk = require('chalk');
|
||||||
var connect = require('connect');
|
var connect = require('connect');
|
||||||
var ReactPackager = require('./react-packager');
|
var ReactPackager = require('./react-packager');
|
||||||
var blacklist = require('./blacklist.js');
|
var blacklist = require('./blacklist.js');
|
||||||
@ -88,13 +89,35 @@ console.log('\n' +
|
|||||||
' ===============================================================\n'
|
' ===============================================================\n'
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Looking for JS files in\n ', options.projectRoots.join('\n '));
|
console.log(
|
||||||
|
'Looking for JS files in\n ',
|
||||||
|
chalk.dim(options.projectRoots.join('\n ')),
|
||||||
|
'\n'
|
||||||
|
);
|
||||||
|
|
||||||
process.on('uncaughtException', function(e) {
|
process.on('uncaughtException', function(e) {
|
||||||
console.error(e);
|
if (e.code === 'EADDRINUSE') {
|
||||||
console.error(e.stack);
|
console.log(
|
||||||
console.error('\n >>> ERROR: could not create packager - please shut down ' +
|
chalk.bgRed.bold(' ERROR '),
|
||||||
'any existing instances that are already running.\n\n');
|
chalk.red('Packager can\'t listen on port', chalk.bold(options.port))
|
||||||
|
);
|
||||||
|
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:' + options.port), '\n');
|
||||||
|
console.log('You can either shut down the other process:');
|
||||||
|
console.log('\n ', chalk.bold('kill -9 <PID>'), '\n');
|
||||||
|
console.log('or run packager on different port.');
|
||||||
|
} else {
|
||||||
|
console.log(chalk.bgRed.bold(' ERROR '), chalk.red(e.message));
|
||||||
|
var errorAttributes = JSON.stringify(e);
|
||||||
|
if (errorAttributes !== '{}') {
|
||||||
|
console.error(chalk.red(errorAttributes));
|
||||||
|
}
|
||||||
|
console.error(chalk.red(e.stack));
|
||||||
|
}
|
||||||
|
console.log('\nSee', chalk.underline('http://facebook.github.io/react-native/docs/troubleshooting.html'));
|
||||||
|
console.log('for common problems and solutions.');
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
var server = runServer(options, function() {
|
var server = runServer(options, function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user