From e7e0cd5fa656e87b1381c7ba0c9ef3214b53f319 Mon Sep 17 00:00:00 2001 From: Pritam Nanda Date: Sat, 9 Aug 2025 20:52:07 +0530 Subject: [PATCH 1/2] Update init.md init commands have been changed to react-native-community/cli@latest from react-native@latest. And some more similar changes. ** Check for yarn related commands. --- docs/init.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/init.md b/docs/init.md index 74cb9a7ec..0d4598ebf 100644 --- a/docs/init.md +++ b/docs/init.md @@ -3,7 +3,7 @@ There are couple of ways to initialize new React Native projects. ```sh -npx react-native@latest init ProjectName +npx react-native-community/cli@latest init ProjectName ``` > Note: If you have both `yarn` and `npm` installed on your machine, React Native CLI will always try to use `npm`. You can force usage of `yarn` by adding `--pm yarn` flag to the command. @@ -20,10 +20,10 @@ yarn init && yarn add react-native && yarn react-native init ProjectName ```sh # This will use the latest init command but will install react-native@VERSION and use its template -npx react-native@latest init ProjectName --version ${VERSION} +npx react-native-community/cli@latest init ProjectName --version ${VERSION} -# This will use init command from react-native@VERSION -npx react-native@${VERSION} init ProjectName +# This will use init command from react-native@VERSION through react-native-community/cli@${VERSION} (e.g. X.XX.X) automatically +npx react-native-community/cli@${VERSION} init ProjectName ``` ## Initializing project with custom template @@ -35,7 +35,7 @@ It should point to a valid package that can be installed with `npm` or `yarn` (i The most common options are: -- Full package name, eg. `react-native-template-typescript`. +- Full package name, eg. `react-native-template-typescript` or `react-native-template-javascript`. - Absolute path to directory containing template, eg. `file:///Users/username/project/some-template`. - Absolute path to a tarball created using `npm pack`. @@ -43,16 +43,16 @@ For all available options, please check [Yarn documentation](https://classic.yar ```sh # This will initialize new project using template from `react-native-template-typescript` package -npx react-native@latest init ProjectName --template ${TEMPLATE_NAME} +npx react-native-community/cli@latest init ProjectName --template ${TEMPLATE_NAME} # This will initialize new project using init command from react-native@VERSION but will use a custom template -npx react-native@${VERSION} init ProjectName --template ${TEMPLATE_NAME} +npx react-native-community/cli@${VERSION} init ProjectName --template ${TEMPLATE_NAME} ``` You can force usage of `yarn` if you have both `yarn` and `npm` installed on your machine: ```sh -npx react-native@latest init ProjectName --pm yarn +npx react-native-community/cli@latest init ProjectName --pm yarn ``` ## Creating custom template From 5240298081eef1009acf45b701e9a16469b1c417 Mon Sep 17 00:00:00 2001 From: Pritam Nanda Date: Sun, 10 Aug 2025 02:25:08 +0530 Subject: [PATCH 2/2] Update init.md --- docs/init.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/init.md b/docs/init.md index 0d4598ebf..742e69238 100644 --- a/docs/init.md +++ b/docs/init.md @@ -35,7 +35,7 @@ It should point to a valid package that can be installed with `npm` or `yarn` (i The most common options are: -- Full package name, eg. `react-native-template-typescript` or `react-native-template-javascript`. +- Full package name, eg. `react-native-template-typescript`. - Absolute path to directory containing template, eg. `file:///Users/username/project/some-template`. - Absolute path to a tarball created using `npm pack`.