Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Manish-kumar-9601 opened this issue Aug 2, 2024 · 3 comments

Comments

@Manish-kumar-9601
Copy link

Manish-kumar-9601 commented Aug 2, 2024

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

@Manish-kumar-9601 Manish-kumar-9601 changed the title React-native Template React-native Template [npx react-native@latest init ProjectName --pm npm] Aug 2, 2024
@Manish-kumar-9601 Manish-kumar-9601 changed the title React-native Template [npx react-native@latest init ProjectName --pm npm] React-native Template failed [npx react-native@latest init ProjectName --pm npm] Aug 2, 2024
@steavenb
Copy link

steavenb commented Aug 22, 2024

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
Copy link
Author

Manish-kumar-9601 commented Aug 23, 2024

Use expo

npx create-expo-app my-app

For more details visit expo react native website

@qper228
Copy link

qper228 commented Aug 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants