cli icon indicating copy to clipboard operation
cli copied to clipboard

Getting Error While initialization react native app in ubuntu

Open Harsh3341 opened this issue 1 year ago • 13 comments

Ask your Question

While I'm initializing the react native app I'm receiving the following error: image

I have checked I have yarn version 1.22.19 on my machine

What could be a possible solution for it?

Harsh3341 avatar May 06 '24 18:05 Harsh3341

@Harsh3341 what's the output of yarn --version?

szymonrybczak avatar May 06 '24 19:05 szymonrybczak

@Harsh3341 what's the output of yarn --version?

1.22.19

Harsh3341 avatar May 07 '24 06:05 Harsh3341

Now yarn issue is sorted but still I'm receiving image

Harsh3341 avatar May 07 '24 13:05 Harsh3341

Have you solved your problem @Harsh3341 I am also facing the same problem Ubuntu 22.04

km-saifullah avatar May 07 '24 16:05 km-saifullah

Have you solved your problem @Harsh3341 I am also facing the same problem Ubuntu 22.04

not yet

Harsh3341 avatar May 07 '24 16:05 Harsh3341

@Harsh3341 If you solve this just mention here how you solve that okay Brother!

km-saifullah avatar May 07 '24 16:05 km-saifullah

@szymonrybczak is there any solution?

Harsh3341 avatar May 10 '24 16:05 Harsh3341

@Harsh3341 I have solved my problem by downgrading the version of React-native. Try to use the command below

npx [email protected] init AwesomeProject --version 0.70

km-saifullah avatar May 10 '24 17:05 km-saifullah

@Harsh3341 I have solved my problem by downgrading the version of React-native. Try to use the command below

npx [email protected] init AwesomeProject --version 0.70

Thnx @km-saifullah it works, but it need to know why the latest version is causing such issue

Harsh3341 avatar May 11 '24 13:05 Harsh3341

@Harsh3341 Welcome. Yes, I also search about this issue. But still did not get anything valuable from the internet.

km-saifullah avatar May 11 '24 14:05 km-saifullah

hey, you shouldn't use 0.70.0 as a version becuase it's outdated and is not longer supported. Please run init command with --verbose option and reply with your error.

szymonrybczak avatar May 12 '24 03:05 szymonrybczak

@szymonrybczak using npx react-native@latest init --verbose is working fine, just getting the following error now

cannot parse yarn version

rest everything is working correctly, I have also run the code and the template app is working fine.

but running the command npx react-native@latest init without --verbose is causing the error attached in the starting image, why is It so?

Harsh3341 avatar May 13 '24 18:05 Harsh3341

hey @Harsh3341!

just getting the following error now

cannot parse yarn version

If issue is still presented could you please try logging error under this statement?

https://github.com/react-native-community/cli/blob/4d65f1d113bf12ad08e1b817d3e2d9183272aeb8/packages/cli/src/tools/yarn.ts#L36

but running the command npx react-native@latest init without --verbose is causing the error attached in the starting image, why is It so?

Error thrown during project creation were catched by one catch statement related to Cocoapods installation failure 😅 It'll fixed once https://github.com/react-native-community/cli/pull/2394 lands.

szymonrybczak avatar Jun 24 '24 18:06 szymonrybczak