Skip to content

Instantly share code, notes, and snippets.

@ryanhs
Last active September 21, 2022 02:33
Show Gist options
  • Save ryanhs/425c1454e101024d4e09215609ec773d to your computer and use it in GitHub Desktop.
Save ryanhs/425c1454e101024d4e09215609ec773d to your computer and use it in GitHub Desktop.
yarn private registry
yarn config set registry http://localhost:4873
cat ~/.yarnrc
from node:16
env YARN_REGISTRY="https://my-registry"
RUN yarn config get registry
RUN yarn install

yarn example

YARN_REGISTRY="https://my-registry" yarn config get registry

prove of concept

$  YARN_REGISTRY="https://my-registry" yarn add @ryanprivate/test
yarn add v1.22.11
warning ../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://my-registry/@ryanprivate%2ftest: getaddrinfo ENOTFOUND my-registry".
info If you think this is a bug, please open a bug report with the information provided in "/tmp/yarntest/a/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment