You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] corepack not use COREPACK_NPM_REGISTRY install of tarball #792
When the COREPACK_NPM_REGISTRY environment variable is set, the tarball mirror URL is always used instead of the one set in COREPACK_NPM_REGISTRY.
This is likely because the URL in line 243 of installVersion is overwritten with the tarball address, but the replace function in line 249 still replaces it with DEFAULT_NPM_REGISTRY_URL.
I looked at this. The replace on line 249 is harmless, the arguments run the other way. The real gap is that it only rewrites tarball URLs that start with https://registry.npmjs.org, so when the registry in COREPACK_NPM_REGISTRY advertises dist.tarball on another host (the upstream it mirrors, a CDN), the download goes there instead, and without the token since httpUtils.fetch only attaches it for the configured origin. I'll open a PR that resolves the tarball path against the configured registry.
Activity
Yash121l commentedon Sep 15, 2026
I looked at this. The
replaceon line 249 is harmless, the arguments run the other way. The real gap is that it only rewrites tarball URLs that start withhttps://registry.npmjs.org, so when the registry inCOREPACK_NPM_REGISTRYadvertisesdist.tarballon another host (the upstream it mirrors, a CDN), the download goes there instead, and without the token sincehttpUtils.fetchonly attaches it for the configured origin. I'll open a PR that resolves the tarball path against the configured registry.