New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init project hangs forever #2797
Comments
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.
|
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. |
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.
|
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 |
@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 Happy to review a pull request that adds the output back under a |
+1 |
@mkonicek I'll be looking into it. |
Add --verbose option to react-native-cli (fixes #2797)
To everyone having problems with project creation: With next version of React Native CLI you can use react-native init MyAwesomeProject --verbose |
yay! 👍 |
Thanks for the PR @winterbe! |
My pleasure! React native is awesome, keep up the great work every one! |
When executing react-native init AwesomeProject --verbose, I get these: This will walk you through creating a new React Native project in D:\Developer\FrontEnd\AwesomeProject
Installing react-native package from npm...
events.js:154
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at exports._errnoException (util.js:856:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)
at Function.Module.runMain (module.js:449:11)
at startup (node.js:141:18)
at node.js:933:3 node version: v5.7.1 |
reinstall nodejs fix my issue :) |
thanks --verbose works :) |
The official doc Getting Started should add this "--verbose", or this will make new user confused a lot. |
@gengjiawen I am also getting this error when trying to append --verbose (because you know, react-native init fails and I'd like to know why). How did you fix your problem ? Updating node didn't do it for me. |
@warpdesign don't use upgrade.you need to uninstall the old version,then install the new version. |
@captain-miao it works!!! |
This takes way longer than is typical for a command line operation that gives no status. It would be terrific to see a message "Downloading 73mb of data. This could take awhile. Use --verbose to watch progress." rather than having to surf the web to this ticket to understand what it is doing. |
Still having this problems, Installing RN0.33 with Node 6.50 npm 3.10.6 I don't know what do , been trying the last few days, diferent versions of RN without success. My internet connection is good and everything seems to be fine, just It doesn't install. Any way to install the package manually? Thanks |
I am experiencing this problem as of today. I've reinstalled brew, node, watchman, react-native-cli and when I do a verbose install, it just gets stuck after all the npm packages have installed (of which react is not one):
It just sits there indefinitely. If I kill the process then all I have in my project folder is package.json and node_modules. Any ideas? EDIT This is the first project I have tried to create since upgrading to macOS Sierra a week or so ago. Could this be at fault? I can run and work on existing projects under Sierra FYI, just can't create new ones. |
@MichaelBurgess I have same problem, but also can't run existing project. |
@MichaelBurgess it helped, thanks |
Something doesn't feel right with
|
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 :) |
For reference @MichaelBurgess suggests doing this (should save you a click) and that suggestion worked for me
references |
@MichaelBurgess it helped, thanks |
@MichaelBurgess i have same problem but on windows 8. any solution ? Thanks |
|
Looking through the verbose output, 151.101.40.162 keeps timing out. |
@captain-miao 厉害了,我的哥 |
I've this problem when try first run
Node: v7.2.1 |
It's weird, I had been facing this issue when I realized I was trying to init a project called |
@fourcolors This worked for me! Your awesome dude 👍 Spend a day and half trying to figure it out. |
restarting multiple times got it to work for me. |
@captain-miao soluation work for me, I am in China. |
Will anyone tell how to fix this?? |
I cannot create a new react-native project any more (worked yesterday). The init command hangs forever in this state:
The directory
MyProject
gets created with a single filepackage.json
with the following content: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?
The text was updated successfully, but these errors were encountered: