nuxt / cli

⚡️ Nuxt Generation CLI Experience.
https://github.com/nuxt/cli/discussions/3
MIT License
269 stars 65 forks source link

`Nuxi init -t` 404s on `nuxt.json` #456

Closed davidjbradshaw closed 3 weeks ago

davidjbradshaw commented 3 months ago

When I run nuxi init -t it fails as follows.

 % npx nuxi init -t my-project
Need to install the following packages:
nuxi@3.12.0
Ok to proceed? (y) 

[11:22:43 AM]  ERROR  Error: Failed to download template from registry: Failed to download nuxt template info 
from https://raw.githubusercontent.com/nuxt/starter/templates/templates/nuxt.json: 404 Not Found

Looking at the template it indeed does not contain the file that fails to be found here.

kiarashmankouei commented 2 months ago

hi please use "npx nuxi info" to have version of node and nuxt .

kiarashmankouei commented 2 months ago

i use nuxi 3.11 and works for me try " npx nuxi@3.11.0 init ".

Jos620 commented 2 months ago

Same problem here.

npx nuxi info outputs:

- Operating System: `Darwin`
- Node Version:     `v18.20.3`
- Nuxt Version:     `-`
- CLI Version:      `3.13.1`
- Nitro Version:    `-`
- Package Manager:  `unknown`
- Builder:          `-`
- User Config:      `-`
- Runtime Modules:  `-`
- Build Modules:    `-`

Running with version 3.11 didn't work as well.

danielroe commented 3 weeks ago

-t is meant to point to the path of a template (for example, on github, with something like -t gh:danielroe/template).

In your case, just run npx nuxi init my-project

Jos620 commented 3 weeks ago

@danielroe running npx nuxi init my-project throws the exact same error:

Image

danielroe commented 3 weeks ago

try npx nuxi@latest init nuxt-app

Jos620 commented 3 weeks ago

npx nuxi@latest init nuxt-app raises the same error.

I thought it was some network issue in my machine, but running:

node -e "fetch('https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json').then(r => r.json()).then(console.log)"

Seem to find this:

{
  "name": "v3",
  "defaultDir": "nuxt-app",
  "url": "https://nuxt.com",
  "tar": "https://codeload.github.com/nuxt/starter/tar.gz/refs/heads/v3"
}