Skip to content

[create-vite] can't startup a project without interactive CLI #13535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 tasks done
cfigueiroa opened this issue Jun 15, 2023 · 1 comment
Closed
7 tasks done

[create-vite] can't startup a project without interactive CLI #13535

cfigueiroa opened this issue Jun 15, 2023 · 1 comment

Comments

@cfigueiroa
Copy link

Describe the bug

Bug Report: Unable to Create Vite Project without Answering CLI Questions

Description:
I am attempting to create a new Vite project using the provided example commands and passing all the necessary parameters, as mentioned in the documentation. However, I am encountering an issue where the CLI prompts me for additional information despite passing the required parameters.

Environment:

Version: create-vite 4.3.2
Operating System: Windows 10 10.0.19045
npm version: 9.7.1
node version: v18.16.0
PowerShell: PowerShell 7.4.0-preview.3

Reproduction Steps:

Open PowerShell.
Execute the following command: npm create vite@latest my-vue-app -- --template vue
Observe the CLI prompts that appear, even though all parameters have been passed.

Expected Behavior:
I expected the Vite project creation process to proceed without any prompts or questions, as I passed all the necessary parameters while following the example commands and the documentation.

Actual Behavior:
Instead of creating the project directly, the CLI prompts me for additional information. This behavior is inconsistent with the documentation and the expected behavior. I have attached screenshots of the prompts that appear despite passing the parameters.

Screenshots:
image
image
image

Additional Information:
I have attempted different variations of the commands, but I consistently encounter the same problem. This issue prevents me from creating a new Vite project without manual intervention during the CLI process.

Reproduction

https://vitejs.dev/guide/

Steps to reproduce

`PowerShell 7.4.0-preview.3
PS C:\Users\winuser\Desktop> npm create vite@latest my-vue-app -- --template vue
× Select a framework: » Vanilla
✖ Operation cancelled
PS C:\Users\winuser\Desktop> npm create vite@latest my-vue-app -- --template vue
? Select a framework: » - Use arrow-keys. Return to submit.

Vanilla
Vue
React
Preact
Lit
Svelte
Others`

`PS C:\Users\winuser\Desktop\linkr-ts-front> ls
PS C:\Users\winuser\Desktop\linkr-ts-front> npm create vite@latest . -- --template react-ts
? Select a framework: » - Use arrow-keys. Return to submit.

Vanilla
Vue
React
Preact
Lit
Svelte
Others`

System Info

PS C:\Users\winuser\Desktop> npx envinfo --system

  System:
    OS: Windows 10 10.0.19045
    CPU: (20) x64 Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
    Memory: 108.51 GB / 127.88 GB

PS C:\Users\winuser\Desktop> npm -v
9.7.1

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

This is how powershell works. Powershell treats -- special for its own syntax.

A workaround is to use "--" or --- instead. For example, npm create vite@latest my-vue-app --- --template vue.

Closing as this is not a bug in Vite.

related issues:

@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants