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

Something went wrong in downloading and extracting the project files. #917

Open
Pointotech opened this issue Jan 9, 2023 · 5 comments
Open

Comments

@Pointotech
Copy link

Describe the bug

When trying to create a new React-Native app, I get the generic error message "Something went wrong in downloading and extracting the project files."

To Reproduce
Steps to reproduce the behavior:

  1. Run command: create-react-native-app mobile-client
  2. When asked "How would you like to start", pick "Template from expo/examples: https://github.com/expo/examples"
  3. When asked "Pick an example", pick "with-typescript"
  4. See error: "Something went wrong in downloading and extracting the project files."

Expected behavior
This should create a new project.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.5 LTS (Focal Fossa)

Smartphone (please complete the following information):
Not applicable, since I can't even create a project.

@mcintyre94
Copy link

Also seeing this on MacOS, tested multiple templates

$ npx create-react-native-app -t with-router test1
✖ Something went wrong in downloading and extracting the project files.
$ npx create-react-native-app -t navigation test2
✖ Something went wrong in downloading and extracting the project files.
$ npx create-react-native-app -t with-typescript test3
✖ Something went wrong in downloading and extracting the project files.

@blixit
Copy link

blixit commented Feb 1, 2023

I noticed something really strange: if I run the command with --verbose option, it works out. It's not a fix but it can prevent from being stuck while a solution is found

image

@blixit
Copy link

blixit commented Feb 1, 2023

After investigation, I found the exception and the line that triggers this error on my computer (MacBook Pro M1 - macOS 12.6.2)
Environment:

  • yarn 1.22.19 & node 19.3.0
  • OR yarn 1.22.19 & node 16.14.2 (downgrading node)
  • OR yarn 3.4.1 & node 16.14.2 (upgrading yarn)

image

In my case the error is triggered by the following function src/Example.ts::downloadAndExtractExampleAsync

When I tried to log the stream behaviour, I got this

Code CLI output
Case 1 image image
Case 2 image image

According to this answer (https://stackoverflow.com/a/61379055) it seems to be an issue with the ending of the stream

this is your problem here a stream is destroyed before it ends normally, either an error or a return/break/throws in an asyncGenerator/asyncFunction

Reproductible result
As you can see in the case 2 scenario, +END and +CLOSE are called before -CLOSE. I get the same output each time the Premature close error is raised

Still investigating...

@Karlelco
Copy link

Also seeing this on MacOS, tested multiple templates

$ npx create-react-native-app -t with-router test1
✖ Something went wrong in downloading and extracting the project files.
$ npx create-react-native-app -t navigation test2
✖ Something went wrong in downloading and extracting the project files.
$ npx create-react-native-app -t with-typescript test3
✖ Something went wrong in downloading and extracting the project files.

did you find a solution for this error?

@Karlelco
Copy link

✖ Something went wrong in downloading and extracting the project files.

need fix for this on linux systems

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

No branches or pull requests

4 participants