react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.34k stars 899 forks source link

React-native Template failed [npx react-native@latest init ProjectName --pm npm] #2467

Open Manish-kumar-9601 opened 1 month ago

Manish-kumar-9601 commented 1 month ago

C:\Users\manis\OneDrive\Documents\React Native>npx react-native@latest init ProjectName --pm npm

Running: npx @react-native-community/cli init

              Welcome to React Native!
             Learn once, write anywhere

⠋ Downloading templateerror Installing pods failed. This doesn't affect project initialization and you can safely proceed. However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.

✖ Downloading template

Run instructions for Android: • Have an Android emulator running (quickest way to get started), or a device connected. • cd "C:\Users\manis\OneDrive\Documents\React Native\ProjectName" && npx react-native run-android

steavenb commented 3 weeks ago

Faced the same issue here. Was fine 3 weeks ago when I initialised a new project but now it errors out.

Looks like something to do with the requirement of template.config.js or the usage of yarn by default.

Ultimately, forcing npm usage worked for me => npx @react-native-community/cli init TestProject --pm npm

Looks like upgrading to latest yarn will open a can of worms.

Manish-kumar-9601 commented 3 weeks ago

Use expo

npx create-expo-app my-app

For more details visit expo react native website

qper228 commented 3 weeks ago

Faced the same issue here. Was fine 3 weeks ago when I initialised a new project but now it errors out.

Looks like something to do with the requirement of template.config.js or the usage of yarn by default.

Ultimately, forcing npm usage worked for me => npx @react-native-community/cli init TestProject --pm npm

Looks like upgrading to latest yarn will open a can of worms.

saved my day