Closed jarnanchen closed 9 years ago
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 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
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. nodejs@4.1.2 npm@3.3.5 linux mint@17.2
+1 (OSX - El Capitan)
Same problem. From China nodejs@4.1.2 npm@2.14.6 OSX - El Capitan
From China +1 How to deal with the problem?
in HK. so slow... not working for several times
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 https://github.com/facebook/react-native/pull/3193
I've tried cnpm, but still hang for a long time waiting for the modules to be installed.
Same issue. npm 2.14.4 node v4.1.2 OSX - Yosemite United States, San Mateo if it matters
open Activity Monitor
,
make sure git
process is downloading.
which will download about 70M files.
Patience
is very important@yinzSE Thanks, that's very helpful.
@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'
@yinzSE Thank you so much. I solved it with your advice by switching npm version :)
@warpdesign I don't know how to solve that. sorry to let you down
Try running it with sudo because the long error log had "[Username] does not have permission...". It worked in a flash for me.
@yinzSE It works. Thanks a lot!
@yinzSE It works. Thanks a lot!
Well, it took more than 5 minutes for me before i forced to stop.
After that i tried it again with sudo
. It took 3 seconds, not more.
In China, npm is blocked by gfw causing react-native init hangs.
There are two solutions:
vim
which react-native``echo 'registry = https://registry.npm.taobao.org' > ~/.npmrc
(Recommeded!)Then you can re-run react-native init AwesomeProject
, it would be much faster. But if you still feel it is slow, try react-native init AwesomeProject --verbose
, and you can see what is going on.
Same problem to me . I stuck in loadDep:react-tools ▐ ╢██████████████░░░░░░ After read all comments , I wait 2hours ,the progress bar never move. Can I download the files by myself? osx 10.11 node v5.0.0 npm 3.3.6 vpn in USA Sanfrancisco
@wfxiang08 after seting the registry now ,still stuck in another position
npm verb afterAdd /Users/wellingfine/.npm/babel-core/5.8.34/package/package.json written loadDep:react-tools ▄ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
hm.. I try the above opinions, this issue still existed.
wfxiang08 Thanks!
@wellingfine sorry to hear that. My solution indeed solve my problem effectively. But if the problem still exists, then I don't know what to do~~
Same problem from China. Change npm registry to https://registry.npm.taobao.org solve my problem.
same problem from India also
Waiting Waiting Waiting for a long time
Execute react-native init ProjectName --verbose
option
+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 ▄ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
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?
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....
@yinzSE It works, thx. I just do this: VPN use USA npm source use https://registry.npmjs.org/
haha...
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
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
no I am using VPN, I am not going to use chinese shit servers for nothing
After I do
react-native init AwesomeProject
,it just hangs atThis 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.