This should fix the error, for me it worked
npm config set registry https://registry.npmmirror.com/ --global