Closed
Description
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?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
winterbe commentedon Sep 17, 2015
Hm, after a couple of retries and after waiting a huge amount of time, the project is finally created.
jarnanchen commentedon Sep 17, 2015
Hi @winterbe I had the same issue , I don't know why is it taking so long to init, what's the root cause?
winterbe commentedon Sep 17, 2015
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.
pandurangnayak commentedon Sep 19, 2015
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.
winterbe commentedon Sep 19, 2015
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.
behl1 commentedon Sep 21, 2015
+1
johngoren commentedon Sep 25, 2015
Happening for me too.
iSimar commentedon Sep 27, 2015
Same problem here, I have to keep trying to get it to complete and build.
Has anyone found a solution?
johngoren commentedon Sep 27, 2015
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)
RxDx commentedon Sep 28, 2015
+1
erg commentedon Sep 28, 2015
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.
swastik commentedon Sep 29, 2015
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.46 remaining items
robbiemoore commentedon Oct 13, 2016
I run --verbose, and it halts with this message:
How come it doesn't install this as supposed to?
Edit: this problem was solved by running @MichaelBurgess suggestion above :)
fourcolors commentedon Oct 14, 2016
For reference @MichaelBurgess suggests doing this (should save you a click) and that suggestion worked for me
references
0xfurai commentedon Oct 14, 2016
@MichaelBurgess it helped, thanks
dennyrachmadi commentedon Oct 18, 2016
@MichaelBurgess i have same problem but on windows 8. any solution ? Thanks
Timoses commentedon Oct 25, 2016
react-native init <project> --verbose
:Verbose mode should maybe only display warnings and errors. It's incredibly cumbersome to scan through all those "verb" and "info" entries...
fakediulei commentedon Nov 29, 2016
@captain-miao 厉害了,我的哥
realtebo commentedon Dec 31, 2016
I've this problem when try first run
Node: v7.2.1
npm: 4.0.5
Windows 10 Pro x64
farskid commentedon Jan 11, 2017
It's weird, I had been facing this issue when I realized I was trying to init a project called
test
and there was already a test folder inside the directory.itajenglish commentedon Jan 11, 2017
@fourcolors This worked for me! Your awesome dude 👍 Spend a day and half trying to figure it out.
JasonHenson commentedon Jan 31, 2017
restarting multiple times got it to work for me.
1c7 commentedon Feb 20, 2017
@captain-miao soluation work for me, I am in China.
pptyasar commentedon Aug 4, 2017
Will anyone tell how to fix this??