Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: init now expects templates to have react-native version set #2422

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: output raw error on pods failing to install in debug
Useful to see the error message instead of swallowing it if the user
enables `--verbose`.
blakef committed Jun 21, 2024
commit 9ac0e0551e63c586ba98c1c29a7310dd4466ae58
4 changes: 2 additions & 2 deletions packages/cli/src/commands/init/init.ts
Original file line number Diff line number Diff line change
@@ -337,19 +337,19 @@ async function createFromTemplate({
loader.succeed('Dependencies installation skipped');
}
} catch (e) {
loader.fail();
if (e instanceof Error) {
logger.error(
'Installing pods failed. This doesn\'t affect project initialization and you can safely proceed. \nHowever, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.\n',
);
logger.debug(e as any);
}
loader.fail();
didInstallPods = false;
} finally {
fs.removeSync(templateSourceDir);
}

if (process.platform === 'darwin') {
logger.log('\n');
logger.info(
`💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field. \n${chalk.reset.dim(
`For more details, see ${chalk.underline(