Vishal Ravanank
Vishal Ravanank

Reputation: 9

When I try to run npm create vite@latest my-react-js-app -- --template react -y it says: npm warn Unknown cli config "--template"

I'm trying to create a new React app using Vite with the following command from Vite official site:

npm create vite@latest my-react-js-app -- --template react -y

However, I get this warning:

npm WARN Unknown cli config "--template"

The command does not execute as expected. How can I fix this issue?

System details:

I also tried running:

npm create vite@latest my-react-js-app --template react

but the issue persists.

How can I resolve this and properly create a Vite React project in a single command without being prompted to select the framework (vanilla, Vue, React, etc.) and the variant (JavaScript or TypeScript) I want to use for my app?

Upvotes: -1

Views: 52

Answers (1)

sagar sonawane
sagar sonawane

Reputation: 1

Just do

npm create vite@latest my-react-js-app 

It will ask what framework you want to use and its variation. It will the same template vite has added in template repo

Upvotes: -2

Related Questions