Retry using different registry mirror if registry.yarnpkg.com fails?

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
If the connection to registry.yarnpkg.com fails and the retries also fail, the installation totally fails

What is the expected behavior?
It would be nice to have a fallback mechanism. If hitting registry.yarnpkg.com fails multiple times, maybe try using CloudFlare’s mirror (npmjs.cf) or registry.npmjs.com directly, or something like that.

  • Only fall back on failures
  • Do NOT do this for registry server names other than the default registry.yarnpkg.com (ie. if user changes the registry, respect that setting)
  • It’s probably only safe to do this for modules that are already listed in the lock file, as we already know the hash of the good file

Author: Fantashit

1 thought on “Retry using different registry mirror if registry.yarnpkg.com fails?

  1. Echoing @EirikBirkeland, this would have saved us a lot of hassle this week. registry.yarnpkg.com has been failing intermittently all week for us and causing chaos. I know there a a few mirrors available, I’d love to be able to declare of list of mirrors to try incise the previous one fails;-

    registry.yarnpkg.com
    yarn.npmjs.org
    registry.npmjs.org
    npmjs.cf
    registry.npmjs.com
    registry.yarnpkg.com
    

Comments are closed.