create-vite
raw JSON → 1.0.33 verified Mon Apr 27 auth: no javascript
Official scaffolding tool for Vite projects. Version create-vite@9.0.6 is bundled with Vite 8.0.10. Released frequently alongside Vite. Key differentiator: interactive CLI with template selection for vanilla, Vue, React, Preact, Lit, Svelte, Solid, Qwik (with JS/TS variants). Supports npm, yarn, pnpm, bun. Requires Node.js 18+ (some templates need higher). Community templates available via Awesome Vite.
Common errors
error Error: Cannot find module 'create-vite' ↓
cause Using `npx create-vite` without @latest or missing package.
fix
Use
npm create vite@latest or install globally: npm install -g create-vite error Error: Failed to download template from GitHub ↓
cause Network issues or wrong template name.
fix
Check template list. Use official template name like
vue-ts. Ensure internet connection. Warnings
gotcha npm 7+ requires extra double-dash (--) before template option, but yarn/pnpm/bun do not. ↓
fix Use `npm create vite@latest my-app -- --template vue` (with `--`). For yarn: `yarn create vite my-app --template vue` (no `--`).
breaking Vite 5 dropped support for Node.js <18. Some templates may require Node.js 20+. ↓
fix Upgrade Node.js to 18+ (prefer 20+). Check template requirements.
deprecated Template option `--template react-ts` is now `react-swc-ts` in newer versions? Actually, both exist. But `react-ts` is still valid. ↓
fix Use `react-swc-ts` for better performance, or keep `react-ts` for standard compiler.
Install
npm install create-vite-init yarn add create-vite-init pnpm add create-vite-init Quickstart
npm create vite@latest my-vue-app -- --template vue
cd my-vue-app
npm install
npm run dev