This one I had been dealing with, in random instances, for so long. I honestly felt like feeding puppies to alligators because of it.
Symptom: You're either behind a firewall or using node within a Vagrant guest (or worse, both), and you merrily type
npm install, hit enter, and it either takes FOREVER to complete the task, or it simply dies with a pragmatically ambiguous
SOLUTION: simply run
npm set registry https://registry.npmjs.org/ and BOOM, as if nothing ever stood between you and your precious npm packages.
It should be noted that I've seen devs theorize online that it is the difference between
registry.npmjs.org that's the cause. Have seen no difference either way. It's the running of
npm set registry with a valid mirror that truly solves the error.