I went to upgrade my project to 0.22.0, and it 'froze' on one of the packages. I tried all different things to make sure it wasn't network related. I couldn't pinpoint the issue (none of my troubleshooting worked).
I then put it back on 0.21.0 and it works perfectly.
I completely uninstalled npm and node to do a 100% fresh start:
$ npm -v
3.7.3
$ node -v
v5.9.0
I still have the same issue. It's hard to tell what the exact problem is, because when I run npm install react-native --verbose it cuts off the package name, and also doesn't give any useful info that I can see.
This is where it hangs though:

There is also a few of these sporadically thrown in the output:
retry will retry, error on last attempt: Error: read ECONNRESET
However, I'm not using a proxy (apparently causes that error a lot) and doing npm install when its 0.21.0 works 100% so I don't think it's anything like a service being down or my internet.
Is it possible it's as simple as github having issues that seem to have been solved just? https://twitter.com/githubstatus
This happened about an hour prior to GitHub going down.
Also, I tried again just now, works with old version, new version still hangs.
FYI here's the further discussion on Facebook group with some logs & screenshots https://www.facebook.com/groups/react.native.community/permalink/740000516135529/?comment_id=740072162795031&reply_comment_id=740096302792617&comment_tracking=%7B%22tn%22%3A%22R0%22%7D

same here
Martin Konicek Ah, it might be that --verbose doesn't work on Windows. Could you create a separate GitHub issue for that?
Another thing you can try:
react-native init should create a folder called TestApp. Do the Windows equivalent of these commands:
cd TestApp
rm -rf node_modules
npm install --verbose --save react-native
rm -rf node_modules rm is not windows command ;) something is processing ill give you quick update in some minutes.

Stack here
@rpdiss Does the screenshot show the point where it gets stuck forever?
ye last line is the place that not moving. tooked 20min no progress.
If you put 0.22.0-rc3 in your package.json and do rm -rf node_modules; npm install does it work? What if you put 0.22.0-rc there and do rm -rf node_modules; npm install? Just trying to understand what's happening on your machine. For me it works with 0.22.0 but I'm on Mac OS.
If the above doesn't work you could also try with npm 2, I have:
$ node -v
v4.3.1
$ npm -v
2.14.22
We test with npm 3 on CircleCI (Unix) and my colleague just tried npm 3 on a Mac. We don't have any Windows machines around or automated tests on Windows unfortunately :(
btw im using react-native-cli... what version of it is 0.22.0-rc ?
anyways 0.22.0-rc downloads ok but on react-native init testapp i get only this json in folder.
{"name":"testapp","version":"0.0.1","private":true,"scripts":{"start":"node node_modules/react-native/local-cli/cli.js start"}}
@mkonicek It's broken on OSX for me btw.
$ npm -v
3.7.3
$ node -v
v5.9.0
It also gets stuck at the same spot for me as it does @rpdiss (netwo)
0.22.0-rc3 appears to be the last working version for me, everything after has same problem.
so what should i do ?:) remember that im using react native cli and w10... i cant install react-native globaly;p
Ok i got temp fix this editted
%appdata%\Roaming\npm\node_modules\react-native-cli\index.js
line 191 exec('npm install --save [email protected]', function(e, stdout, stderr) {
0.22.0-rc3 appears to be the last working version for me, everything after has same problem.
This is super useful, thank you @9mm! I'm thinking this could cause it, although not sure yet why only for some people: https://github.com/facebook/react-native/commit/cafbeb08feb9f7694f45a3f307cb90ce8344c959
@rpdiss You can do the following until we ship a proper fix (hopefully tomorrow):
# The version of react-native-cli doesn't matter
rm -rf TestApp
cd TestApp
in package.json remove react-native from dependencies
rm -rf node_modules
npm install --save [email protected]
This is pretty much exactly what the CLI (react-native init did after you made the change to it).
Does it work for you now?
Can you guys both confirm that 0.22.0-rc3 works for you? If yes I'll release a hotfix, reverting cafbeb0.

Confirm screen :dancers:
Nice!!
Thank you @rpdiss.
but i edited the index.js cuz rm -rf is not windows command @mkonicek
Ah, I think it's rmdir on Windows :)
@rpdiss @9mm I've just published 0.22.2 reverting cafbeb0. react-native init should work now out of the box (no local changes to CLI needed). Can you verify please?
Works now!

Amazing, thank you!
@rpdiss Are we good to close this one? Thanks for the help debugging!
I'd be curious to know what that was, why it broke.. if you ever come across the answer.
ye im okay even working on device :+1:
cc @bestander, I had to remove the shrinkwrap. Two different people narrowed it down to exactly that same commit that added shrinkwrap (rc4 hanged in npm install, rc3 worked): https://github.com/facebook/react-native/commits/v0.22.2
Thanks so much guys! I'll close this issue. Updated the fb thread.
npm-shrinkwrap was added to the package in case we have a downstream break of dependencies, having all dependencies locked could give some assurance that install will keep working.
I suppose we will have to abandon idea of shipping shrinkwrap, considering all the hiatus it gave us in the recent few releases.
This bug I suppose was caused by some dependency that installs fine on Linux (our CI) but gets stuck on Windows.
npm-shrinkwrap is OS dependent and generates the tree based on what is installed in the system it is generated on.
cc @skevy
Damn. Ok. Thanks @bestander and @mkonicek. It's too bad, but until shrinkwrap's mechanics change some day this the right call. :-/
Thanks to everyone on this thread for narrowing down the issue.
Most helpful comment
FYI here's the further discussion on Facebook group with some logs & screenshots https://www.facebook.com/groups/react.native.community/permalink/740000516135529/?comment_id=740072162795031&reply_comment_id=740096302792617&comment_tracking=%7B%22tn%22%3A%22R0%22%7D