After setting up verdaccio and publishing a private package to it, I configured the yarn registry to send requests to the verdaccio proxy server. However, when making requests to the proxy server, yarn is also sending additional requests to the yarnpkg server for unrelated packages. This raises two important issues:
- yarn should not be making unnecessary requests for other packages that are not dependencies of the desired package.
- yarn should not be requesting data from the
yarnpkg
server when the user has explicitly set the registry.
$ yarn config get registry
http://localhost:4873/
$ yarn config list
yarn config v1.15.2
info yarn config
{ 'version-tag-prefix':
'v',
'version-git-tag':
true,
'version-commit-hooks':
true,
'version-git-sign':
false,
'version-git-message':
'v%s',
'init-version':
'1.0.0',
'init-license':
'MIT',
'save-prefix':
'^',
'bin-links':
true,
'ignore-scripts':
false,
'ignore-optional':
false,
registry:
'http://localhost:4873/',
'strict-ssl':
true,
'user-agent':
'yarn/1.15.2 npm/? node/v10.15.2 linux x64',
'cache-folder':
'/tmp',
lastUpdateCheck:
1556742143802 }
info npm config
{}
Done in 0.03s.
$ yarn add @electron-e/store --verbose
yarn add v1.15.2
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
... (remaining content omitted for brevity) ...
verbose 13.409 Performing "GET" request to "https://registry.yarnpkg.com/@types/react-slick/-/react-slick-0.23.3.tgz".
verbose 13.423 Error: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
error An unexpected error occurred: "https://registry.yarnpkg.com/antd/-/antd-3.16.6.tgz: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/devilfromir/Code/projects/desktop/NRobo/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.