Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'You can disable it using "--no-jetifier" flag.',
)}`,
);
try {
await execa(require.resolve('jetifier/bin/jetify'), {stdio: 'inherit'});
} catch (error) {
throw new CLIError('Failed to run jetifier.', error);
}
}
if (!args.packager) {
return buildAndRun(args);
}
return isPackagerRunning(args.port).then(result => {
if (result === 'running') {
logger.info('JS server already running.');
} else if (result === 'unrecognized') {
logger.warn('JS server not recognized, continuing with build...');
} else {
// result == 'not_running'
logger.info('Starting JS server...');
try {
startServerInNewWindow(
args.port,
args.terminal,
config.reactNativePath,
);
} catch (error) {
logger.warn(
`Failed to automatically start the packager server. Please run "react-native start" manually. Error details: ${