|
1 | 1 | --- |
2 | 2 | title: Install Vue.js directly on Windows |
3 | | -description: A guide to help you get started using the Vue.js web frameworks directly on Windows. |
| 3 | +description: A guide to help you get started using Vue.js on Windows using npm create vue and Vite. |
4 | 4 | ms.topic: install-set-up-deploy |
5 | | -ms.date: 03/30/2021 |
| 5 | +ms.date: 03/23/2026 |
6 | 6 | --- |
7 | 7 |
|
8 | 8 | # Install Vue.js directly on Windows |
9 | 9 |
|
10 | | -A guide to help you set up a Vue.js development environment on Windows. Learn more on the [Vue.js overview](./vue-overview.md) page. |
| 10 | +A guide to set up a Vue.js development environment on Windows. For background, see the [Vue.js overview](./vue-overview.md). |
11 | 11 |
|
12 | | -Vue can be installed directly on Windows or on the Windows Subsystem for Linux (WSL). We generally recommend that you [install Vue on WSL](./vue-on-wsl.md) if you are planning to interact with a NodeJS backend, want parity with a Linux production server, or plan to follow along with a tutorial that utilizes Bash commands. You may also want to consider [Vite](https://vitejs.dev/guide/why.html) as an alternative to Vue.js. |
| 12 | +Vue can be installed directly on Windows or on the Windows Subsystem for Linux (WSL). If you plan to interact with a Node.js backend, deploy to Linux servers, or follow tutorials that use Bash commands, consider [installing Vue on WSL](./vue-on-wsl.md) instead. |
13 | 13 |
|
14 | 14 | ## Prerequisites |
15 | 15 |
|
16 | | -- [Install Node.js on Windows](./nodejs-on-windows.md): This includes a version manager, package manager, and Visual Studio Code. The Node Package Manager (npm) is used to install Vue.js. |
| 16 | +- [Install Node.js on Windows](./nodejs-on-windows.md): This includes a version manager, package manager, and Visual Studio Code. |
17 | 17 |
|
18 | | -## Install Vue.js |
| 18 | +## Create a Vue project |
19 | 19 |
|
20 | | -To install Vue.js: |
| 20 | +The recommended way to start a new Vue 3 project is `npm create vue@latest`, which uses [create-vue](https://github.com/vuejs/create-vue) — the official Vite-based scaffolding tool: |
21 | 21 |
|
22 | | -1. Open a command line (ie. Windows Command Prompt or PowerShell). |
| 22 | +1. Open PowerShell or Windows Command Prompt. |
23 | 23 |
|
24 | | -2. Create a new project folder: `mkdir VueProjects` and enter that directory: `cd VueProjects`. |
| 24 | +2. Navigate to your projects directory: |
25 | 25 |
|
26 | | -3. Install Vue.js using Node Package Manager (npm): |
| 26 | + ```powershell |
| 27 | + cd C:\Users\YourName\Projects |
| 28 | + ``` |
27 | 29 |
|
28 | | -```powershell |
29 | | -npm install vue |
30 | | -``` |
| 30 | +3. Create a new Vue project: |
31 | 31 |
|
32 | | -Check the version number you have installed by using the command: `vue --version`. |
| 32 | + ```powershell |
| 33 | + npm create vue@latest |
| 34 | + ``` |
33 | 35 |
|
34 | | -> [!NOTE] |
35 | | -> To install Vue.js using a CDN, rather than NPM, see the [Vue.js install docs](https://vuejs.org/v2/guide/installation.html#CDN). See the Vue docs for an [Explanation of different Vue builds](https://vuejs.org/v2/guide/installation.html#Explanation-of-Different-Builds). |
| 36 | + The installer prompts you to name your project and choose optional features (TypeScript, JSX support, Vue Router, Pinia state management, Vitest, ESLint). |
36 | 37 |
|
37 | | -## Install Vue CLI |
| 38 | +4. Navigate into the project folder, install dependencies, and start the dev server: |
38 | 39 |
|
39 | | -Vue CLI is a toolkit for working with Vue in your terminal / command line. It enables you to quickly scaffold a new project (vue create), prototype new ideas (vue serve), or manage projects using a graphical user interface (vue ui). Vue CLI is a globally installed npm package that handles some of the build complexities (like using Babel or Webpack) for you. *If you are not building a new single-page app, you may not need or want Vue CLI.* |
| 40 | + ```powershell |
| 41 | + cd <your-project-name> |
| 42 | + npm install |
| 43 | + npm run dev |
| 44 | + ``` |
40 | 45 |
|
41 | | -To install Vue CLI, use npm. You must use the `-g` flag to globally install in order to upgrade (`vue upgrade --next`): |
42 | | - |
43 | | -```PowerShell |
44 | | -npm install -g @vue/cli |
45 | | -``` |
46 | | - |
47 | | -To learn more about additional plugins that can be added (such as linting or Apollo for integrating GraphQL), visit [Vue CLI plugins](https://cli.vuejs.org/guide/#cli-plugins) in the Vue CLI docs. |
| 46 | + Your app will be available at `http://localhost:5173`. |
48 | 47 |
|
49 | 48 | ## Additional resources |
50 | 49 |
|
51 | | -- [Vue docs](https://vuejs.org/) |
| 50 | +- [Vue docs](https://vuejs.org/guide/introduction.html) |
52 | 51 | - [Vue.js overview](./vue-overview.md) |
53 | 52 | - [Install Vue.js on WSL](./vue-on-wsl.md) |
54 | | -- [Install Nuxt.js](./nuxtjs-on-wsl.md) |
55 | 53 | - [Take your first steps with Vue.js](/training/paths/vue-first-steps/) learning path |
56 | | -- Try a [Vue tutorial with VS Code](https://code.visualstudio.com/docs/nodejs/vuejs-tutorial) |
| 54 | +- [Vue tutorial with VS Code](https://code.visualstudio.com/docs/nodejs/vuejs-tutorial) |
0 commit comments