react-native init hangs without any error output
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.
https://github.com/facebook/react-native/issues/2797 Looks like someone has got the same issue like mine
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
UPDATE : After wait for a long time , the init was successful
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.
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
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.
@mkonicek Yes , I am in China. However I did tried several times via VPN connection, not much help though.
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.
still spinning... about 35min now. Going to make another coffee...
@deepflame you can try npm3, it will gives you more information
Hey @kebot , thanks for your hint. I installed NPM 3 now and it went through!
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... https://github.com/facebook/react-native/issues/1758
@deepflame just feel free to remove the detection code in packager/packager.js
@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?
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"(然并卵).
@yinzSE can you post the output here?
@kebot i succeeded after a long time, and before that there is nothing output. i use [email protected] do not use npm3.x
sudo npm install -g [email protected]
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
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.
I have the same problem. I live in Taiwan and below is my environment information. [email protected] [email protected] linux [email protected]
+1 (OSX - El Capitan)