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
COREPACK_NPM_REGISTRY with trailing slash causes double slash in package URLs #759
When setting COREPACK_NPM_REGISTRY from npm get registry, if the registry URL ends with a trailing slash, Corepack incorrectly constructs package URLs with a double slash, resulting in HTTP 404 errors.
Steps to Reproduce
Configure npm registry with trailing slash:
npm config set registry https://registry.example.com/artifactory/api/npm/npm/
Export the registry to Corepack:
export COREPACK_NPM_REGISTRY=$(npm get registry)
Try to use Corepack with yarn:
corepack use yarn
Actual Error
Internal Error: Server answered with HTTP 404 when performing the request to https://registry.example.com/artifactory/api/npm/npm//@yarnpkg/cli-dist; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
at fetch (/home/user/.local/share/fnm/node-versions/v24.10.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22051:11)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async fetchAsJson (/home/user/.local/share/fnm/node-versions/v24.10.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22058:20)
at async fetchAvailableVersions (/home/user/.local/share/fnm/node-versions/v24.10.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22001:20)
at async fetchAvailableVersions2 (/home/user/.local/share/fnm/node-versions/v24.10.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22139:14)
Activity
zanminkian commentedon Nov 12, 2025
Relate: #656
MikeMcC399 commentedon Nov 17, 2025
This appears to be a duplicate of issue #711
COREPACK_NPM_REGISTRY#711