cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open ANANT-0000 opened this issue 1 year ago • 3 comments

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

ANANT-0000 avatar Aug 02 '24 15:08 ANANT-0000

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.

steavenb avatar Aug 22 '24 23:08 steavenb

Use expo

npx create-expo-app my-app

For more details visit expo react native website

ANANT-0000 avatar Aug 23 '24 04:08 ANANT-0000

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

qper228 avatar Aug 25 '24 09:08 qper228

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.

github-actions[bot] avatar Nov 24 '24 03:11 github-actions[bot]