nuxt/cli

Error: Failed to download template from registry: fetch failed

Closed this issue · 8 comments

npx nuxi init my-app is not work.

win11 22631.2338
npm 9.6.7
nodejs 18.17.1

pi0 commented

Hi. Would be nice if you can provide a reproduction or some more info. But it is likely that you have a Netowrk/Firewall issue on your machine.

image

'npx nuxi init my_app' returns this information. Is there another way to get more error information?

Hi. Would be nice if you can provide a reproduction or some more info. But it is likely that you have a Netowrk/Firewall issue on your machine.

Where is the 'nuxi init' template stored? When I use the proxy tool, it still displays Error: Failed to download template from registry: fetch failed.
image

nobkd commented

The default template is here: https://github.com/nuxt/starter/tree/v3

After ipv6 DNS is configured, the download succeeds.
设置 ipv6 的 DNS 后就可以成功下载了。

I was also having this issue when trying to follow the instructions on the Nuxt docs. Running Node v20.8.0 with NPM v10.1.0 in WSL2.

Was able to get it working by globally installing nuxi then running the command without npx.

npm i -g nuxi
nuxi init <project name>

npx nuxi@latest init nuxt3-app
Error: Failed to download template from registry: fetch failed

npx create-next-app@latest
Works perfectly!

npx nuxi@latest init nuxt3-app Error: Failed to download template from registry: fetch failed

npx create-next-app@latest Works perfectly!

thanks,I successfully initialized the nuxt project with a custom nuxt template link.