facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.56k stars 24.37k forks source link

react-native init hangs without any error output #2806

Closed jarnanchen closed 9 years ago

jarnanchen commented 9 years ago

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.

Tarkzeng commented 8 years ago

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

bhrugumehta commented 8 years ago

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 commented 8 years ago

Still having this issue.

bhrugumehta commented 8 years ago

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

dramirezp commented 8 years ago

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

dramirezp commented 8 years ago

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

vrspider commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

navmalc commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

jefe-spain commented 8 years ago

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 commented 8 years ago

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

wietsevenema commented 8 years ago

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

rcugut commented 8 years ago

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:

https://github.com/facebook/react-native/blob/9ee815f6b52e0c2417c04e5a05e1e31df26daed2/packager/react-packager/src/node-haste/FileWatcher/index.js#L20

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

probably related: #2797

itsMikey commented 8 years ago

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 commented 7 years ago

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 commented 7 years ago

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

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