Registry / web-framework / create-vue

create-vue

JSON →
library3.22.2jsnpmunverified

create-vue is the official and recommended command-line interface (CLI) tool for quickly scaffolding new Vue.js projects. Currently at stable version 3.22.2, it is actively maintained by the Vue.js core team with frequent releases to align with Vue, Vite, and ecosystem updates. Its primary differentiator from the legacy Vue CLI is its foundation on Vite, providing a significantly faster development experience through rapid cold starts and instant Hot Module Replacement (HMR). Unlike Vue CLI, create-vue primarily acts as a scaffolding utility, generating a pre-configured project and then delegating subsequent operations to Vite, allowing projects to fully leverage the Vite plugin ecosystem. Since v3.22.0, it defaults to generating TypeScript projects, reflecting the modern Vue development landscape.

npm install create-vue
INSTALL
IMPORT
SIG · CREATE-VUE
C
create-vue
web-frameworkjavascriptv3.22.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI Tool
✓ npx create-vue@latest
✗ import { createVue } from 'create-vue'
This package is a command-line interface (CLI) tool for scaffolding new Vue.js projects and is not intended for direct programmatic import into other applications. It is executed via `npx` or `npm create` in the terminal.

Demonstrates how to initialize a new Vue 3 project using the interactive `create-vue` CLI, prompting for features like TypeScript, Router, and Pinia. A non-interactive example shows direct flag usage for a full setup.

npm create vue@latest my-vue-app # Follow the interactive prompts to select features (TypeScript, Router, Pinia, etc.) cd my-vue-app npm install npm run dev # Alternatively, for a non-interactive setup with common features: npm create vue@latest my-ts-app -- --typescript --router --pinia --vitest --playwright --eslint --prettier --git --force
create-vue --version
Debug
Known issues
breakingStarting with version 3.22.0, `create-vue` now generates TypeScript projects by default. Projects scaffolded without explicitly opting out of TypeScript will automatically include `.ts` files and a `tsconfig.json`.
fix
To create a JavaScript project, use `npm create vue@latest -- --no-typescript` or select JavaScript during the interactive prompt when asked.
affects: >=3.22.0
gotchaAlways specify `@latest` or `@legacy` when running `npm create vue` to ensure you get the current or correct Vue 2 version. Omitting the tag may result in npm resolving to a cached and outdated package version.
fix
Use `npm create vue@latest` for Vue 3 projects or `npm create vue@legacy` for Vue 2 projects to guarantee the desired version.
affects: >=3.0.0
deprecatedVue 2 has officially reached End of Life (EOL). While `create-vue@legacy` can still scaffold Vue 2 projects, it is strongly recommended to use Vue 3 for all new projects due to the lack of official support, security updates, and continued development for Vue 2.
fix
Prioritize creating new projects with Vue 3 using `npm create vue@latest`. If Vue 2 is strictly required, be fully aware of its EOL status and associated risks.
affects: *
breakingNightwatch support was dropped in `create-vue` version 3.22.1. Projects scaffolded with versions 3.22.1 or later will no longer offer Nightwatch as an option for end-to-end testing.
fix
Consider alternative E2E testing frameworks like Cypress or Playwright for new projects. For existing projects, manually integrate Nightwatch if necessary, or migrate to a supported E2E solution.
affects: >=3.22.1
gotchaThe `create-vue` package requires Node.js version `^20.19.0` or `>=22.12.0`. Using an older or unsupported Node.js version may lead to installation errors or unexpected behavior during project scaffolding.
fix
Ensure your Node.js environment meets the specified requirements. Tools like `nvm` (Node Version Manager) can help manage multiple Node.js versions effectively.
affects: >=3.22.2
gotchaPowerShell users must quote the double dashes (`--`) when passing feature flags or options to `create-vue` via `npm create`. Forgetting to quote can lead to parsing errors.
fix
In PowerShell, enclose the double dashes in single quotes: `npm create vue@latest '--' --typescript --router`.
affects: *
Errors
Common errors & fixes
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/create-vue npm ERR! 404 npm ERR! 404 'create-vue@latest' is not in the npm registry.
This error often occurs when the `@latest` or `@legacy` tag is omitted, or an outdated local npm cache is used, preventing resolution to the correct package version.
fix
Ensure you specify the tag: `npm create vue@latest` (for Vue 3) or `npm create vue@legacy` (for Vue 2). If the issue persists, clear your npm cache with `npm cache clean --force`.
SyntaxError: Cannot use import statement outside a module
`create-vue` is a command-line interface (CLI) tool, not a JavaScript/TypeScript library intended for direct programmatic import into application code.
fix
`create-vue` is executed via `npm create vue@latest` or `npx create-vue@latest` in your terminal. Do not attempt to import it into your JavaScript/TypeScript files.
Error: Cannot find module 'typescript' or similar TypeScript compilation errors in a seemingly JavaScript project.
Since `create-vue` v3.22.0, new projects default to TypeScript. If you intended a JavaScript project but didn't explicitly opt out, TypeScript files and configurations will be present.
fix
If a JavaScript project is desired, ensure to explicitly opt out of TypeScript during scaffolding: `npm create vue@latest -- --no-typescript`. For existing projects, you will need to manually remove TypeScript configurations and dependencies.
The 'engines.node' field is not supported. Please use the 'engines' field in your package.json.
This is a generic npm error, but often related to Node.js version incompatibility. While `create-vue` itself specifies engines, if your Node.js version is outside the supported range, it could manifest as various installation issues.
fix
Check the `engines.node` requirement for `create-vue` (e.g., `^20.19.0 || >=22.12.0`). Update your Node.js version using a tool like `nvm` to meet the package's requirements.
Upgrade
Version history
3.22.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
create-vue — npm install create-vue · libregistry