cli icon indicating copy to clipboard operation
cli copied to clipboard

`nuxi init` fails with `Failed to download template from registry: fetch failed`

Open Busayor2020 opened this issue 1 year ago • 1 comments

Environment

This has been a consistent problem, and I have tried various solutions, including updating npm to the latest version and forcefully cleaning the npm cache. Unfortunately, the issue persists.

Steps to Reproduce:

  1. Open the terminal.
  2. Run the command: npx nuxi@latest init threads-clone.

Expected Behavior: I expect the Nuxt project initialization to proceed without errors and the template to be downloaded successfully.

Actual Behavior: The process fails with the error mentioned above.

C:\Users\HP>npx nuxi@latest init threads-clone   ERROR  Error: Failed to download template from registry: fetch failed

Environment Information:

  • Operating System: C:\Windows\system32\cmd.exe
  • Node.js Version: C:\Users\HP> node -v v20.9.0
  • npm Version: C:\Users\HP> npm -v 10.2.3

Additional Context: I have researched similar issues on the Nuxt GitHub page and have attempted solutions suggested in the documentation and community discussions. However, the problem persists.

I would greatly appreciate any assistance or guidance on resolving this issue. Thank you for your time and support.

Reproduction

C:\Users\HP>npx nuxi@latest init threads-clone

ERROR Error: Failed to download template from registry: fetch failed

Describe the bug

C:\Users\HP>npx nuxi@latest init threads-clone

ERROR Error: Failed to download template from registry: fetch failed

Additional context

No response

Logs

No response

Busayor2020 avatar Nov 10 '23 11:11 Busayor2020

I have the same problem.

Environment

Operating System: Windows 11 22H2 22621.2715

Node.js Version: v20.8.0

npm Version: 10.1.0

Reproduction

D:\>npx nuxi@latest init
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

 ERROR  Error: Failed to download template from registry: fetch failed

D:\>npx [email protected] init
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

 ERROR  Error: Failed to download template from registry: fetch failed

Maybe it's a DNS problem? Take a look at /etc/hosts https://github.com/nuxt/cli/issues/159#issuecomment-1712453911

iusx avatar Nov 23 '23 21:11 iusx