create-react-native-app
create-react-native-app copied to clipboard
Something went wrong in downloading and extracting the project files.
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:
- Run command:
create-react-native-app mobile-client - When asked "How would you like to start", pick "Template from expo/examples: https://github.com/expo/examples"
- When asked "Pick an example", pick "with-typescript"
- 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.
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.
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
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)
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 | ![]() |
![]() |
| Case 2 | ![]() |
![]() |
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...
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?
✖ Something went wrong in downloading and extracting the project files.
need fix for this on linux systems



