Expo: exp init fails to complete after a previous run was cancelled

Created on 5 Dec 2017  路  1Comment  路  Source: expo/expo

I was creating a new project with exp init, after selecting the template I wanted to use I noticed I was in the wrong directory. I sent a SIGINT via ^C which stopped the tool.

I moved to the right directory and tried again, but the tool would now exit with the following error message:

[exp] Extracting project files...

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Process exited with non-zero code: 2

I run again with a different template (tabs instead of blank) and it worked. I run it with strace and noticed it was trying to uncompress the file ~/.expo/starter-app-cache/blank-23.0.0.tar.gz which was incomplete because of me cancelling the previous run of the program.

I guess there are several ways you could go around handling this:

  • Clear incomplete files if the process is finishing while downloading.
  • If file extraction fails, ignore and download again.

EDIT: if you run into this problem, workaround is rm ~/.expo/starter-app-cache/*

Most helpful comment

we have landed a commit internally to fix this and we will include it in our next release!

>All comments

we have landed a commit internally to fix this and we will include it in our next release!

Was this page helpful?
0 / 5 - 0 ratings