create-vite

raw JSON →
9.0.6 verified Mon Apr 27 auth: no javascript

Scaffolding tool for Vite projects. Version 9.0.6 (current stable), released alongside Vite 8.x. Requires Node.js 20.19+ or 22.12+. Provides interactive CLI to bootstrap projects from official templates (vanilla, vue, react, svelte, lit, solid, preact, qwik) with TypeScript variants. Alternative to manual setup or CRA. Supports npm, yarn, pnpm, bun, deno. Frequently updated to match Vite releases. Community templates available via Awesome Vite.

error Node.js version \d+\.\d+\.\d+ detected. This version of create-vite requires Node.js 20.19+ or 22.12+.
cause Using an outdated Node.js version.
fix
Upgrade Node.js to v20.19+ or v22.12+.
error Error: Cannot find module 'create-vite'
cause Running `npx create-vite` without installing or using the wrong package manager command.
fix
Use npm create vite@latest (or yarn/pnpm/bun create) instead of npx create-vite.
error Unknown template: my-template
cause Specified a template that does not exist in the official list.
fix
Use one of the official templates: vanilla, vanilla-ts, vue, vue-ts, react, react-ts, preact, preact-ts, lit, lit-ts, svelte, svelte-ts, solid, solid-ts, qwik, qwik-ts.
error The `--template` flag is required when using additional arguments.
cause Using extra arguments (e.g., project name) without specifying a template.
fix
Add --template <name> to the command, e.g., npm create vite@latest my-app -- --template react.
breaking Requires Node.js 20.19+ or 22.12+ as of create-vite 9.0.0.
fix Upgrade Node.js to v20.19+ or v22.12+.
breaking create-vite 8.x dropped support for Node.js < 18.18.0.
fix Use Node.js 18.18+ or use an older create-vite version.
deprecated The `--template` flag is now required for non-interactive use; older versions allowed omitting it.
fix Always specify `--template <name>` when using command-line arguments.
gotcha npm requires extra double-dash (`--`) before options when using `npm create` with additional args.
fix Use `npm create vite@latest my-app -- --template vue` (note `--` before `--template`).
gotcha Template names are case-sensitive and must match exactly; e.g., `react-ts` not `React-TS`.
fix Use lowercase template names: `vue`, `react-ts`, `svelte`, etc.
npm install create-vite
yarn add create-vite
pnpm add create-vite

Scaffold a new Vite project with React+TypeScript template, install dependencies, and start dev server.

npm create vite@latest my-app -- --template react-ts
cd my-app
npm install
npm run dev