Create Electron Vite

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

A scaffolding tool for creating Electron projects with Vite integration. Version 0.7.1 requires Node.js ^18.0.0 or >=20.0.0. Provides an interactive CLI to generate project templates for Electron + Vite, supporting frontend frameworks like Vue, React, Svelte, etc. It sets up a project structure with separate main, preload, and renderer processes, leveraging Vite's fast HMR and build capabilities. Updated frequently with community contributions.

error Error: Cannot find module 'create-electron-vite'
cause Attempting to require or import the package as a module instead of using the CLI.
fix
Use the create command: npm create electron-vite@latest
error UNSUPPORTED ENGINE: create-electron-vite@0.x.x: wanted: {"node":"^18.0.0 || >=20.0.0"} (current: {"node":"14.x.x"})
cause Node version too old.
fix
Upgrade Node.js to v18 or v20+.
error zsh: command not found: create-electron-vite
cause Running command directly without npx/yarn/pnpm.
fix
Use npm create, yarn create, or pnpm create.
breaking Node.js version requirement: ^18.0.0 || >=20.0.0. Older Node versions will fail.
fix Upgrade Node.js to 18+ or 20+.
gotcha Do not use npm install create-electron-vite globally; always use npm create to scaffold projects.
fix Run 'npm create electron-vite@latest' instead of installing the package.
deprecated Template selection may change across versions; ensure you are using the latest version for up-to-date templates.
fix Update to latest: npm create electron-vite@latest
npm install create-electron-vite
yarn add create-electron-vite
pnpm add create-electron-vite

Creates a new Electron+Vite project, installs dependencies, and starts development server with HMR.

npm create electron-vite@latest my-electron-app
cd my-electron-app
npm install
npm run dev