cli icon indicating copy to clipboard operation
cli copied to clipboard

Error when installing into current folder

Open Arctomachine opened this issue 2 years ago • 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 .

Arctomachine avatar Aug 11 '23 17:08 Arctomachine

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 https://github.com/nuxt/cli/pull/272.

jits avatar Nov 01 '23 14:11 jits

npx nuxi-nightly@latest init . --force

https://github.com/nuxt/cli/pull/272

iusx avatar Nov 23 '23 21:11 iusx