Init project hangs forever
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?
Hm, after a couple of retries and after waiting a huge amount of time, the project is finally created.
Hi @winterbe I had the same issue , I don't know why is it taking so long to init, what's the root cause?
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.
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.
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.
+1
Happening for me too.
Same problem here, I have to keep trying to get it to complete and build. Has anyone found a solution?
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)
+1
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
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 how would you monitor the git process?
Wish there were more verbose messages on what was happening.
@iSimar — On a Mac, open Activity Monitor, go to the 'Network' tab, and you'll see it there.
I am facing the same problem.
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.
+1 Location: kolkata, India
@mkonicek I'll be looking into it.
@mkonicek Submitted PR: https://github.com/facebook/react-native/pull/3193