React-native Template failed [npx react-native@latest init ProjectName --pm npm]
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
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.
Use expo
npx create-expo-app my-app
For more details visit expo react native website
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 npmLooks like upgrading to latest yarn will open a can of worms.
saved my day
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.