Setting custom registry in Yarn doesn't seem to work

Viewed 154

Bug description

I have set yarn registry to a nexus registry using command : yarn config set registry https://custom/nexus/repository/npm-group-n3p/

I can then see the regsitry url in the local .yarnrc file

However, when I then try and run : yarn add [package]

I still get errors related to: info There appears to be trouble with your network connection. Retrying... error An unexpected error occurred: "https://registry.yarnpkg.com/@ant-design/create-react-context/-/create-react-context-0.2.5.tgz: getaddrinfo ENOTFOUND registry.yarnpkg.com". info If you think this is a bug, please open a bug report with the information provided in "c:\Code\bloomrpc\yarn-error.log". NB : I haven't specified the username and password as I'm not sure how to set this with yarn, as _auth key is not supported it seems unlike npm and yarn login command doesn't seem to do the same

I would expect the registry setting to actually still pickup the custom specified registry rather than presumably default registry.yarnpkg.com

Environment

  • Node Version: 12.13.1
  • Yarn v1 Version: 1.22.5
  • OS and version: Windows 10
0 Answers
Related