Skip to content
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

react-native init hangs without any error output #2806

Closed
jarnanchen opened this issue Sep 17, 2015 · 69 comments
Closed

react-native init hangs without any error output #2806

jarnanchen opened this issue Sep 17, 2015 · 69 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jarnanchen
Copy link

After I do react-native init AwesomeProject,it just hangs at This will walk you through creating a new React Native project in /Users/jarnanchen/repo/AwesomeProject, with the slash spinning around for more than 20 minutes.
Tried several times and the results are the same.

@jarnanchen
Copy link
Author

#2797
Looks like someone has got the same issue like mine

@kebot
Copy link

kebot commented Sep 18, 2015

The same problem, so I update my npm to version 3, the same problem

~/Codes/test/node_modules/react-native   242s
❯ cpm install
loadDep:react-tools → aft ▄ ╢█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

in package.json react-tools point to react(don't know why)

 "react-tools": "git://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245",

and I don't know what is aft, it is not a npm package

@jarnanchen
Copy link
Author

UPDATE : After wait for a long time , the init was successful

@kebot
Copy link

kebot commented Sep 18, 2015

Finally, I got the problem, it will takes you more than one day (connection is slow or you are in China) to clone the whole react repository.

@mkonicek
Copy link
Contributor

Are you in China? Can you point npm (and Gradle if you're doing Android development) to some mirror of:
JS and Obj-C code: https://www.npmjs.com/package/react-native
Java code: http://bintray.com/bintray/jcenter

@mkonicek
Copy link
Contributor

Can you please use Stack Overflow to ask questions and tag them with react-native? http://stackoverflow.com/questions/tagged/react-native

This helps us keep track of bugs that need to be fixed in Github issues.

@jarnanchen
Copy link
Author

@mkonicek Yes , I am in China. However I did tried several times via VPN connection, not much help though.

@deepflame
Copy link

hmm, is it true that is clones the whole repo? I am in Germany and have a 25MBit connection. So it should not be slow.
However I am waiting here now for about 10min and I just see the spinnner.

Would be great to have a notice or something that it can take longer otherwise people (like me) think that it is broken.

@deepflame
Copy link

still spinning... about 35min now. Going to make another coffee...

@kebot
Copy link

kebot commented Sep 19, 2015

@deepflame you can try npm3, it will gives you more information

@deepflame
Copy link

Hey @kebot , thanks for your hint. I installed NPM 3 now and it went through!

@deepflame
Copy link

well, but I would not advice to install NPM 3 though. Got stuck now with

Could not find dependencies.
Ensure dependencies are installed - run 'npm install' from project root.

Seems to be an issue with NPM 3... #1758

@kebot
Copy link

kebot commented Sep 19, 2015

@deepflame just feel free to remove the detection code in packager/packager.js

@deepflame
Copy link

@kebot thanks for your hints. However I installed NPM 2 again and it is working now fine.
Will probably copy this newly generated app skeleton then when i want to work on a new one to avoid the problems I had at first. Thanks again and have a nice weekend!

Just tried again. For whatever reason it is working now with NPM 2. Guess it is the npm cache?

@uinz
Copy link

uinz commented Sep 28, 2015

about 8 day ago, i init a project about 10 min , but since yesterday i init a project more than 12 hours
and it's still not finished, i have to cancel it and go bed.
by the way, i am form china, and try to use VPN, however there is popular vocabulary in chian
"then be none"(然并卵).

@kebot
Copy link

kebot commented Sep 28, 2015

@yinzSE can you post the output here?

@uinz
Copy link

uinz commented Sep 28, 2015

@kebot i succeeded after a long time, and before that there is nothing output.
i use npm@2.14.6
do not use npm3.x

sudo npm install -g npm@2.14.6

VPN use USA
npm source use https://registry.npmjs.org/

u can open Monitor to watch “git" process. if it downloading means u just only wait for some time.
and it's will download more then 70M data.

To run your app on iOS:
Open /Users/yinz/Desktop/xs/ios/xs.xcodeproj in Xcode
Hit Run button
To run your app on Android:
Have an Android emulator running, or a device connected
cd /Users/yinz/Desktop/xs
react-native run-android

@welkang
Copy link

welkang commented Oct 5, 2015

I found that this dependency must installed under root permission,
"react-tools": "git://github.com/facebook/react#b4e74e38e43ac53af8acd62c78c9213be0194245",
Maybe this is the reason why it hangs always.

@kenit
Copy link

kenit commented Oct 6, 2015

I have the same problem.
I live in Taiwan and below is my environment information.
nodejs@4.1.2
npm@3.3.5
linux mint@17.2

@warpdesign
Copy link

+1 (OSX - El Capitan)

@solupro
Copy link

solupro commented Oct 9, 2015

Same problem.
From China
nodejs@4.1.2
npm@2.14.6
OSX - El Capitan

@no-repeat
Copy link

From China +1
How to deal with the problem?

@jihopark
Copy link

in HK. so slow... not working for several times

@noscripter
Copy link

in china, facing the same problem 2.

could add --verbose for verbose output, from my experience, I was hold up in the process of loadDep:react-tools

reference #3193

I've tried cnpm, but still hang for a long time waiting for the modules to be installed.

@klvs
Copy link
Contributor

klvs commented Oct 24, 2015

Same issue.
npm 2.14.4
node v4.1.2
OSX - Yosemite
United States, San Mateo if it matters

@uinz
Copy link

uinz commented Oct 28, 2015

open Activity Monitor ,
make sure git process is downloading.
which will download about 70M files.

Patience is very important

@gutenye
Copy link

gutenye commented Oct 28, 2015

@yinzSE Thanks, that's very helpful.

@warpdesign
Copy link

@yinzSE I was patient, but after 20 or 30 minutes, I got this error:

Setting up new React Native app in /Users/leodaed/Dev/ReactSlide fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
          ^

Error: EACCES: permission denied, open '/Users/leodaed/.babel.json'

@codesundar
Copy link

same problem from India also

Waiting Waiting Waiting for a long time

@codesundar
Copy link

Execute react-native init ProjectName --verbose option

@springuper
Copy link
Contributor

+1 for this problem and the stop point doesn't remain stable.

npm verb afterAdd /Users/spring/.npm/babel-core/5.8.34/package/package.json written
loadDep:react-tools       ▄ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

@davedx
Copy link

davedx commented Nov 21, 2015

Same problem here, I'm in the Netherlands. Internet connection is fine. I use npm all the time for multiple projects, so it's really weird it keeps getting stuck for react-native. What is react-native doing that's different?

@d668
Copy link

d668 commented Nov 29, 2015

U updated brew, reinstalled node and npm and run react-native init with --verbose. It showed me the process and after 20 min finally installed the project. Was weird though at the beginning....

@PeterMu
Copy link

PeterMu commented Dec 8, 2015

@yinzSE It works, thx. I just do this:
VPN use USA
npm source use https://registry.npmjs.org/

haha...

@CryptoZ258
Copy link

I also use VPN, but nothing changed, I just fail and try agian on the old folder(choose yes when terminal ask continue), and it successd!
node v4.2.3
npm v2.14.7
Mac OSX , EI Capitan

@captain-miao
Copy link

if you from China, do this:

npm install -g nrm
nrm use taobao

Registry has beensetto: http://registry.npm.taobao.org/

npm install -g react-native-cli --verbose
react-native init AwesomeProject --verbose

very very very ... very fast

@d668
Copy link

d668 commented Dec 31, 2015

no I am using VPN, I am not going to use chinese shit servers for nothing

@Tarkzeng
Copy link

@sundaravelit thank you...
react-native init ProjectName --verbose

@bhrugumehta
Copy link

In india it's working perfectly but it's take much time approx 3 to 4 minuts but depends upon your internet speed. I think it dowload so many module whole size of 70 MB

@sdaitzman
Copy link

Still having this issue.

@bhrugumehta
Copy link

can you send me output what you get after running through command ... react-native init ProjectName --verbose

@dramirezp
Copy link

Did somebody find the solution? I'm stuck with this :( http://stackoverflow.com/questions/35961873/react-native-init-awesomeproject-hang

@dramirezp
Copy link

After a few hours I decided to restart the computer and start the process again, and now it is working ;-( this is annoying

@vrspider
Copy link

Here in the Netherlands
node v5.9.0
npm 3.7.3

I run react-native init AwesomeProject --verbose
then it got stuck here

npm verb afterAdd /Users/x/.npm/babel-plugin-transform-es2015-template-literals/6.6.5/package/package.json written
loadDep:babel-plugin-tran ▐ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

I use https://registry.npmjs.org

@ZxBing0066
Copy link

When I run the init command, it will hangs after the output below when without sudo.

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

But when I run with sudo,it will be successed,don't konw why.
The next output is:

Setting up new React Native app in /Users/ZxBing0066/Workspace/personal/App

@DearX-dlx
Copy link

i have same problem from china,then i useing VPN(Japan),and it successed!

@navmalc
Copy link

navmalc commented Jul 15, 2016

Had this today (UK). Running with --verbose and it's still taking ages but at least I know it's doing something this time.

@ghost
Copy link

ghost commented Aug 26, 2016

China:

cd $HOME
wget https://cdn.npm.taobao.org/react-native/-/react-native-0.32.0.tgz #example
react-native init AwesomeProject --version ~/react-native-0.32.0.tgz

Other country:

cd $HOME
wget https://registry.npmjs.org/react-native/-/react-native-0.32.0.tgz #example
react-native init AwesomeProject --version ~/react-native-0.32.0.tgz

@PurpleBracket
Copy link

Still having the issue today. NYC
Windows 10
node.js v4.4.5
npm 3.5.2

@jefe-spain
Copy link

jefe-spain commented Sep 17, 2016

Still have this issue, It hangs in

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

And It stay like that forever.

npm 3.10.7
node 6.2.1

Any ideas please?`

@AlessandroAnnini
Copy link

@jefe-spain i have the same issue have you resolved it yet?.. here's the issue link #9943

@wietsevenema
Copy link

Hanging after npm info ok seems to be caused by watchman. Just chiming in here to report the workaround documented in #9943 works.

@rcugut
Copy link

rcugut commented Oct 8, 2016

I had react-native hang for a different reason => watchman . On my Mac, I had to:

rm -rf /usr/local/run/watchman/*

to clear whatever watchman had leftover, that was making it hang w/o any output. And along with it, it got react-native to hang:

execSync('watchman version', {stdio: 'ignore'});

Maybe this helps anyone. It took me almost one hour to debug this ...

probably related: #2797

@itsMikey
Copy link

Seeing as some people are still having trouble, I found that using Yarn sped upreact-native init tremendously. I've had it download successfully in as little as 10 seconds and at most 2 minutes.

Here's a little guide on how to use react-native with yarn.
http://kryptonik.net/2016/10/how-to-use-react-native-with-yarn/

@SinaKarimi7
Copy link

First you should download and install latest node.js installer from here
then open cmd on Administrator and run:

npm install -g react-native-cli

Good lock :)

@s2zaman
Copy link

s2zaman commented Dec 28, 2016

I was having issue with the command react-native run-ios

Got it running by just using the sudo with the command.
:) 👍

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests