react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Init project hangs forever

Open winterbe opened this issue 11 years ago • 60 comments

I cannot create a new react-native project any more (worked yesterday). The init command hangs forever in this state:

$ react-native init MyProject
This will walk you through creating a new React Native project in /Users/.../Projects/MyProject
\

The directory MyProject gets created with a single file package.json with the following content:

{"name":"MyProject","version":"0.0.1","private":true,"scripts":{"start":"node_modules/react-native/packager/packager.sh"}}

The slash/backslash is still flipping but no matter how long I wait, nothing happens. Connection to NPM is working generally, e.g. I'm able to install new packages, so my internet connection should be fine.

I tried with Node 4.0.0 as well as latest Node 4.1.0 and NPM 2.14.3.

I'm curious because yesterday everything worked like a charm, so I guess my general config is fine.

Any help?

winterbe avatar Sep 17 '15 08:09 winterbe

Hm, after a couple of retries and after waiting a huge amount of time, the project is finally created.

winterbe avatar Sep 17 '15 09:09 winterbe

Hi @winterbe I had the same issue , I don't know why is it taking so long to init, what's the root cause?

johnnychendev avatar Sep 17 '15 15:09 johnnychendev

I really don't know what causes this issue. It took like 10 min until some logs get printed and the command succeeded. Is there some kind of -verbose mode for react-native-cli? That would be handy in those situations.

Am 17.09.2015 um 17:28 schrieb Jr [email protected]:

Hi @winterbe I had the same issue , I don't know why is it taking so long to init, what's the root cause?

— Reply to this email directly or view it on GitHub.

winterbe avatar Sep 17 '15 15:09 winterbe

I get the same problem. I let it run for hours and it still hadn't gone beyond the one file and the same line mentioned above by @winterbe.

I am on node v4.0.0 and npm v2.14.2.

pandurangnayak avatar Sep 19 '15 10:09 pandurangnayak

I first thought that it was a local problem on my machine/ network but it seems more and more people have the same problem.

So I reopen the issue now in hope that someone finds out the root cause of the problem.

winterbe avatar Sep 19 '15 10:09 winterbe

+1

behl1 avatar Sep 21 '15 10:09 behl1

Happening for me too.

johngoren avatar Sep 25 '15 20:09 johngoren

Same problem here, I have to keep trying to get it to complete and build. Has anyone found a solution?

iSimar avatar Sep 27 '15 16:09 iSimar

It's weird, it only happened to me on a MacBook where I had made some aborted early attempts to brew install, and hadn't done the updating and symlinking right and had to fix permissions prior to running the command line tool.

On my desktop Mac, when I brew updated first, it ran much smoother (and there weren't any symlink or permissions issues)

johngoren avatar Sep 27 '15 16:09 johngoren

+1

RxDx avatar Sep 28 '15 18:09 RxDx

Something is definitely taking too long, but it works after 10 minutes on my late 2012 macbook pro. I was about to give up but it kept spinning.

node --version
v4.1.1

erg avatar Sep 28 '15 19:09 erg

It downloads about ~73mb of data and does that very slowly, but once it is downloaded, it goes through just fine. You can use something that monitors the git process to see where it's at.

swastik avatar Sep 29 '15 12:09 swastik

@swastik how would you monitor the git process?

iSimar avatar Sep 29 '15 14:09 iSimar

Wish there were more verbose messages on what was happening.

johngoren avatar Sep 29 '15 15:09 johngoren

@iSimar — On a Mac, open Activity Monitor, go to the 'Network' tab, and you'll see it there.

swastik avatar Sep 29 '15 16:09 swastik

I am facing the same problem.

piyushtiwari avatar Oct 01 '15 07:10 piyushtiwari

We actually decided to hide the output from npm install in https://github.com/facebook/react-native/commit/2ddf3d942dc080264bf5f17c1381e7e5f39e2f4f

Happy to review a pull request that adds the output back under a --verbose option.

mkonicek avatar Oct 01 '15 21:10 mkonicek

+1 Location: kolkata, India

ivks avatar Oct 02 '15 06:10 ivks

@mkonicek I'll be looking into it.

winterbe avatar Oct 02 '15 07:10 winterbe

@mkonicek Submitted PR: https://github.com/facebook/react-native/pull/3193

winterbe avatar Oct 02 '15 08:10 winterbe