5

I wanted to follow this tutorial (https://facebook.github.io/react-native/docs/getting-started.html) to start learning react-native.

I followed the first steps and I ran into some issues on the command line: expo init AwesomeProject

Here's the log :

PS C:\Users\ANTD\react_native> expo init AwesomeProject2
? Choose a template: blank
[09:06:11] Extracting project files...
Process exited with non-zero code: 2
ERROR: C:\Users\ANTD\.expo\starter-app-cache\blank-31.0.0.tar.gz
C:\Users\ANTD\.expo\starter-app-cache\blank-31.0.0.tar.gz
Open ERROR: Can not open the file as [gzip] archive


ERRORS:
Is not archive

Process exited with non-zero code: 2
[09:06:11] Customizing project...
[09:06:11] ENOENT: no such file or directory, open 'C:\Users\ANTD\react_native\AwesomeProject2\app.json'
[09:06:11] Set EXPO_DEBUG=true in your env to view the stack trace.

I searched on the github page and on forums but didn't find info on this. I also tried this :

deleted files in .expo folder
npm -g uninstall expo-cli --save
npm install -g expo-cli@latest

But same issue.

blank-31.0.0.tar.gz file is empty with only html tags. Might be the issue but I don't know what to do...

Thanks

1
  • Seems to be a network issue. Can you give a try once more! Commented Nov 15, 2018 at 13:57

2 Answers 2

3

Just run in cmd insted of Gitbash

Sign up to request clarification or add additional context in comments.

Comments

2

Same issue here, seems like a network problem to me.

I dug into the source code of expo-cli, found the download link for the template:

"templatesv2": [
    {
      "description": "The Blank project template includes the minimum dependencies to run and an empty root component.",
      "iconUrl": "https://d306o6r76fnu7o.cloudfront.net/template_icon_blank.png",
      "id": "blank",
      "name": "Blank",
      "url": "https://d306o6r76fnu7o.cloudfront.net/blank-31.0.0.tar.gz",
      "version": "31.0.0"
    },
    {
      "description": "The Tab Navigation project template includes several example screens.",
      "iconUrl": "https://d306o6r76fnu7o.cloudfront.net/template_icon_tabs.png",
      "id": "tabs",
      "name": "Tab Navigation",
      "url": "https://d306o6r76fnu7o.cloudfront.net/tabs-31.0.0.tar.gz",
      "version": "31.0.0"
    }
  ],

So I manually download the file and unzip, cd into it and run expo start... and got stuck for about 20 minutes.

After I lost my patience and pressed Ctrl+C to kill this process, then I tried npm run android and it worked!

I also tried npm start afterwards, and it seems to work too.

1 Comment

I was getting a zlib error when running expo init or create-react-native-app, downloaded the blank template file archive manually, extracted into a new directory and ran it with npm start, now I'm up and running, thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.