Issue on exp init

Hi!

Since the last version 44.0.0, i got an error when trying to init a project :

? Choose a template type: tabs

[exp] Downloading project files...
[                                                                                                    ] 
0%(node:81278) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: (0 , (_inquirer || _load_inquirer(...)).default) is not a function
^C%                                                                                                                                                                                                                                                                             

OR

exp init helloworld
? Choose a template type: blank
[exp] Downloading project files...
[exp] Extracting project files...
./node_modules/unpipe/LICENSE: (Empty error message)
tar: Error exit delayed from previous errors.
Process exited with non-zero code: 1

Did i missed something ? I was able to init few weeks ago!

I’m unable to reproduce this issue on OSX and v8.1.3, could you tell me which version of node you’re using ? I’m so sorry you’re encountering this. Must be a total pain!

I am seeing this issue on a fresh install of exp 44.0.0 on OSX 10.12.6. Node version is 6.11.3 (LTS), npm is 3.10.10

Here’s what I got when running exp init:

19:55 $ exp init
? Choose a project name: starsnap
? Choose a template type: blank
[exp] Downloading project files...
[======================================================================================              ] 86%(node:49833) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: (0 , (_inquirer || _load_inquirer(...)).default) is not a function
[exp] Couldn't connect to the server, check your internet connection.
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.
✘-1 ~/git
19:58 $ EXPO_DEBUG=true exp init
? Choose a project name: starsnap
? Choose a template type: blank
[exp] Downloading project files...
[exp] Extracting project files...
./node_modules/lottie-react-native/docs/gifs/Community 2_3.gif: (Empty error message)
tar: Error exit delayed from previous errors.
Process exited with non-zero code: 1

I tried removing the directory and rerunning the init command, but I seem to get the same error regardless.

Was excited to try expo… are there temporary files somewhere that might need to be deleted?

Thanks!
–Andy

1 Like

Hey @andyisaacson! I really want you to be able to use Expo too. I’m sorry you’re going through this.

I ran through the commands again myself and I’m not encountering the same issue, Although my node version is 8.1.3, and my npm version is 5.0.3.

Do you have any special connection configuration on your machine? Are you behind a VPN? It looks like an internet access issue.

No, nothing like that, but I wouldn’t rule out some kind of intermittent failure. The unfortunate thing is that now I seem to be in a spot where I can’t retry - it fails almost immediately. Where do the files that get downloaded go? Could I delete those and try again?

Thanks!
–Andy

Depends on how you installed node and your PATH that may live in ~/.bashrc or ~./profile or ~./bash_profile

Globally installed exp lives in: /usr/local

So I did an npm uninstall of exp, and then reinstalled, but still saw the same issue.

I noticed that the first step (Downloading Project Files) completed almost instantaneously, leading me to believe that it wasn’t actually downloading anything, but instead referring to some set of corrupted files it had downloaded the first time when it had a connection issue. Working off a hunch, I found a .expo directory in my home directory and deleted it. When I tried the command again, I had to re-login, but then it downloaded the files successfully and worked.

In other words, if someone else encounters this problem, they can run rm -rf ~/.expo … I imagine there’s a smaller set of files that could be removed, but I don’t know the system well enough to say which.

Thanks for your help, I think I’m good to go now!

–Andy

3 Likes

I had same problem, I solved deleting .expo as well.
Thanks @andyisaacson

1 Like

Just in case it helps anybody finding this thread: I also ran into the “UnhandledPromiseRejectionWarning” problem described above. I tried deleting the ~/.expo directory (without success), but downgrading npm to the suggested 4.6.1 did fix the problem for me.

npm install -g npm@4.6.1

2 Likes

I’m glad, we will keep making the recommendation to downgrade NPM until the latest version of NPM is supported (or you can just use Yarn)