nuxt/cli

Error when installing into current folder

Opened this issue · 2 comments

Environment


  • Operating System: Windows_NT
  • Node Version: v20.2.0
  • Nuxt Version: 0.0.0
  • Nitro Version: -
  • Package Manager: unknown
  • Builder: webpack
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Following this section of docs: https://nuxt.com/docs/getting-started/installation#new-project

  1. Open project folder in editor/ide
  2. Run pnpm dlx nuxi@latest init .

Describe the bug

Script fails with status 1 when installing into current directory

Additional context

No response

Logs

Nuxi 3.6.5                                                                                                                                                                                                                20:11:31

 ERROR  Error: Destination <path to project folder> already exists.                                                                                                                                    20:11:32  

 ERROR  Command failed with exit code 1: nuxi init .
jits commented

It's possible to install into the current folder using the --force flag (which I think makes sense), but note there is currently a different bug that's fixed by #272.

npx nuxi-nightly@latest init . --force

#272