It is possible that while playing with Node JS you may end up with errors which states “failed to fetch from registry”. Following picture is an example of what I encountered.
The fix for this issue is try running the command added below. For me it worked.
npm config set registry http://registry.npmjs.org/