Clarify behaviour of noop init command in 0.76 (#46547)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46547

While testing the 0.76 RCs, it was initially unclear to me that `npx react-native init` was both deprecated and **removed** (performs a noop). Update message for clarity.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D62881266

fbshipit-source-id: b9017e63360c7aee5483d437ce1510be9a14ef42
This commit is contained in:
Alex Hunt
2024-09-17 10:40:35 -07:00
committed by Facebook GitHub Bot
parent e9d48ae3c7
commit 188f99b17a
+6 -3
View File
@@ -119,10 +119,13 @@ function warnWithDeprecated() {
}
console.warn(`
🚨️ The \`init\` command is deprecated.
🚨️ Creating a project using ${chalk.green('npx react-native init')} is deprecated. Please use:
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
${chalk.green('npx @react-native-community/cli init')}
Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}
${chalk.green('No changes made.')}`);
}
function warnWithExplicitDependency(version = '*') {