"npm create nuxt@latest" and unnamed projects
The command "npm create nuxt@latest" and its derivatives do not correctly recognize projects without a name. I noticed an error when trying to create a project without a name but with additional parameters. For example, in nuxtUI, "npm create nuxt@latest -- -t ui" is used, but the CLI doesn't understand that the project is unnamed and instead creates a project named "-t" without using the correct template.
In this scenario, what I usually do is pass something like "./" in the project name, so it understands that it's undefined and sends it to the expected options.
(Btw, it would be nice if, instead of specifying the project name, I could directly specify the target directory — for example "./", when I want the project to be created in the current folder rather than inside a new one.)
are you running on windows?
yes
this is working fine for me on PowerShell:
...and terminal (the 'undefined' prompt is an annoying separate issue)
can you tell me more about how to reproduce?
I ran some tests and kept getting the same error, and upon comparison I understood the problem. I'm using pnpm, but if I use npm it works as expected.
with pnpm you do not use the double dash
Yes, it works this way. I tried creating it with yarn to see if the same thing happens, but it generates another problem.