Skip to content

Internal Error when Installing [email protected] in the project... #710

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

Open
xmasuhai opened this issue May 10, 2025 · 5 comments
Open

Comments

@xmasuhai
Copy link

Link to the code that reproduces this issue or a replay of the bug
https://github.com/xmasuhai/test-vite

Reproduction steps

cd test-vite
corepack use pnpm@latest-10

Describe the Bug

$ corepack use pnpm@latest
Internal Error: Server answered with HTTP 404 when performing the request to https://registry.npmmirror.com//pnpm; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at fetch (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:22058:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async fetchAsJson (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:22065:20)
    at async fetchAvailableTags (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:22005:20)
    at async fetchAvailableTags2 (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:22128:14)
    at async Engine.resolveDescriptor (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:22981:20)
    at async UseCommand.execute (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:23457:22)
    at async UseCommand.validateAndExecute (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:20258:22)
    at async _Cli.run (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:21195:18)
    at async Object.runMain (D:\software\nvm\v22.15.0\node_modules\corepack\dist\lib\corepack.cjs:23642:19)

Which Node.js version are you using?
22.15.0

Which operating systems have you used
win11

@MikeMcC399
Copy link
Contributor

@xmasuhai

It looks like you have the environment variable COREPACK_NPM_REGISTRY set to https://registry.npmmirror.com/. Is that correct?

If yes, have you tried setting it to https://registry.npmmirror.com instead (without the trailing / character).

@MikeMcC399
Copy link
Contributor

It looks like there are 2 issues involved:

  1. The Chinese npm mirror https://registry.npmmirror.com/ rejects the URL https://registry.npmmirror.com//pnpm whereas the official npm registry https://registry.npmjs.org accepts the URL https://registry.npmjs.org//pnpm and Corepack is then able to install:

Installing [email protected] from https://registry.npmjs.org//pnpm/-/pnpm-10.10.0.tgz

  1. Corepack should not be building the URL with a double slash //. It should strip it down to https://registry.npmmirror.com/pnpm instead. See Requests with double slash using trailing slash (/) in COREPACK_NPM_REGISTRY #711

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented May 12, 2025

Relates also to #535, #540 and #458

@MikeMcC399
Copy link
Contributor

@xmasuhai

If your problem is resolved, you can close this issue with the button below.

@MikeMcC399
Copy link
Contributor

Since there hasn't been any response, I suggest to close this issue.

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

No branches or pull requests

2 participants