nuxt: Error: Failed to download template from registry: fetch failed
Environment
- Operating System: Darwin - Mac M2
- Node Version: v18.16.1
- Nuxt Version: 3.6.1
- Nitro Version: 2.5.2
- Package Manager: npm@9.7.2
- Builder: vite
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
Init new project using Nuxi.
npx nuxi init test
Describe the bug
Impossibility to create a project, the bug is also present when using useFecth with SSR.
Additional context
No response
Logs
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (1 by maintainers)
To all the Indians facing this issue, it is a JioFiber issue. Somehow
raw.githubusercontent.comis blocked (for the lack of better word) on JioFiber. I know, weird, but it is what it is. If you can get access to your router – I haven’t been able to – change the DNS to Google’s (i.e. 8.8.8.8) and it should work fine. If that’s not doable, try using hotspot, will work absolutely fine.To all the non-Indians facing this issue, there might be an issue with your internet provider, too. You might as well change the DNS and see if that works.
Here is the English translation of the provided content:
Solution:
First, ping raw.githubusercontent.com to check if it is accessible. If it is not accessible, visit https://ipaddress.com/website/raw.githubusercontent.com.
Then, add the host entry. On macOS, the host configuration file path is: /etc/hosts Add a new line: 185.199.108.133 raw.githubusercontent.com After adding the host entry, ping raw.githubusercontent.com again to check if it is accessible. If the ping is successful, try running the command npx nuxi init nuxt-app again.
I have resolved the issue, as the domain name
raw.githuusercontent.comcannot resolve the correct IP address. You can ping this domain name to see if you can get an IP address. If it is not possible, modify the host file of the system to any of these four IPs:185.199.108.133,185.199.109.133,185.199.110.133,185.199.111.133For those who have failed, you can manually download the templatefile from this link. https://codeload.github.com/nuxt/starter/tar.gz/refs/heads/v3
working for me Thank you so much.
Try after changing your network. Ex :- Mobile network to wifi OR JIO to GTPL (Other Broadband connection). In my case not working in JIO(Broadband) once we change with GTPL(Broadband) it will installing automatically.
Fixed.
Best way to go about the issue is using VPN which worked for me
I’m also having the same error.
And no, I’m neither using a proxy nor is internet access restricted for me to
raw.githubusercontent.com.I would like to know what is the potential solution for this on mac?
This looks like either a node or an npm issue.