Skip to content

Init project hangs forever #2797

Closed
Closed
@winterbe

Description

@winterbe

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?

Activity

winterbe

winterbe commented on Sep 17, 2015

@winterbe
ContributorAuthor

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

jarnanchen

jarnanchen commented on Sep 17, 2015

@jarnanchen

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

winterbe commented on Sep 17, 2015

@winterbe
ContributorAuthor

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 notifications@github.com:

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.

pandurangnayak

pandurangnayak commented on Sep 19, 2015

@pandurangnayak

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

winterbe commented on Sep 19, 2015

@winterbe
ContributorAuthor

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

behl1 commented on Sep 21, 2015

@behl1

+1

johngoren

johngoren commented on Sep 25, 2015

@johngoren

Happening for me too.

iSimar

iSimar commented on Sep 27, 2015

@iSimar

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

johngoren

johngoren commented on Sep 27, 2015

@johngoren

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

RxDx commented on Sep 28, 2015

@RxDx

+1

erg

erg commented on Sep 28, 2015

@erg

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
swastik

swastik commented on Sep 29, 2015

@swastik

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

robbiemoore commented on Oct 13, 2016

@robbiemoore

I run --verbose, and it halts with this message:

npm WARN react-native@0.35.0 requires a peer of react@~15.3.1 but none was installed.
npm verb exit [ 0, true ]
npm info ok

How come it doesn't install this as supposed to?

Edit: this problem was solved by running @MichaelBurgess suggestion above :)

fourcolors

fourcolors commented on Oct 14, 2016

@fourcolors

For reference @MichaelBurgess suggests doing this (should save you a click) and that suggestion worked for me

rm -rf /usr/local/var/run/watchman/ && brew uninstall watchman && brew install watchman

references

0xfurai

0xfurai commented on Oct 14, 2016

@0xfurai

@MichaelBurgess it helped, thanks

dennyrachmadi

dennyrachmadi commented on Oct 18, 2016

@dennyrachmadi

@MichaelBurgess i have same problem but on windows 8. any solution ? Thanks

Timoses

Timoses commented on Oct 25, 2016

@Timoses

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...

ghost
fakediulei

fakediulei commented on Nov 29, 2016

@fakediulei

@captain-miao 厉害了,我的哥

realtebo

realtebo commented on Dec 31, 2016

@realtebo

I've this problem when try first run

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
(node:4968) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
(node:4968) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Node: v7.2.1
npm: 4.0.5
Windows 10 Pro x64

farskid

farskid commented on Jan 11, 2017

@farskid

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

itajenglish commented on Jan 11, 2017

@itajenglish

@fourcolors This worked for me! Your awesome dude 👍 Spend a day and half trying to figure it out.

JasonHenson

JasonHenson commented on Jan 31, 2017

@JasonHenson

restarting multiple times got it to work for me.

1c7

1c7 commented on Feb 20, 2017

@1c7

@captain-miao soluation work for me, I am in China.

pptyasar

pptyasar commented on Aug 4, 2017

@pptyasar

Will anyone tell how to fix this??

locked as resolved and limited conversation to collaborators on Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @erg@fourcolors@warpdesign@knightsamar@mkonicek

        Issue actions

          Init project hangs forever · Issue #2797 · facebook/react-native