Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to download binaries from private registry in CI environment without internet access and yarn v1 as package manager #1422

Closed
SkReD opened this issue Jul 5, 2021 · 1 comment · Fixed by #1621

Comments

@SkReD
Copy link

SkReD commented Jul 5, 2021

We use an internal nexus instance that contains all of the packages we we need to build and those machines don't have access to the internet. Currently when we try to use esbuild it fails in CI since the installer attempts to download the public registry. We are using yarn v1 as package manager.

None of solutions below worked:

export NPM_CONFIG_REGISTRY
export npm_config_registry
yarn config set registry
yarn config set registry -g
.yarnc
.npmrc

Yarn issues yarnpkg/yarn#5854 and yarnpkg/yarn#5683

Only worked solution was pre-install packages via npm install with --registry option for cache warmup. Also in docker there seems to be problem with process.env.TMPDIR and that require('os').tmpdir() is returns cwd instead of temp directory path (npm/npm#4531).

Can install script be extended with support for custom env variable for registry and with --unsafe-perm flag for correct process.env.TMPDIR value?

@evanw
Copy link
Owner

evanw commented Jul 6, 2021

The plan for fixing these kinds of things is to try using optional dependencies instead: #789. I would like to experiment with that approach instead of trying to add a ton of custom flags to the installer for everyone's unusual use cases. My assumption is that optional dependencies should naturally just work with existing package managers even when they have been heavily reconfigured, although that still needs to be validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants