Skip to content

Commit fb8cd50

Browse files
Fix vue-on-wsl: replace deprecated Vue CLI with npm create vue@latest (Vue 3)
1 parent 9bb1245 commit fb8cd50

1 file changed

Lines changed: 30 additions & 32 deletions

File tree

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,60 @@
11
---
22
title: Install Vue.js on WSL
3-
description: A guide to help you get started using the Vue.js web frameworks on Windows Subsystem for Linux.
3+
description: A guide to help you get started using Vue.js on Windows Subsystem for Linux using npm create vue and Vite.
44
ms.topic: install-set-up-deploy
5-
keywords: Vue, Vue.js, windows 10, install vue, install vue on windows, install vue with windows, install vue for windows, web app with vue, vue dev environment, install vue on windows subsystem for linux, install vue with wsl, install vue on wsl, install vue on ubuntu on windows
5+
keywords: Vue, Vue.js, windows, install vue on wsl, install vue on windows subsystem for linux, vue wsl
66
ms.localizationpriority: medium
7-
ms.date: 08/18/2021
7+
ms.date: 03/23/2026
88
---
99

1010
# Install Vue.js on Windows Subsystem for Linux
1111

12-
A guide to help you set up a Vue.js development environment on Windows by installing the Vue.js web framework on Windows Subsystem for Linux (WSL). Learn more on the [Vue.js overview](./vue-overview.md) page.
12+
A guide to set up a Vue.js development environment on Windows Subsystem for Linux (WSL). For background, see the [Vue.js overview](./vue-overview.md).
1313

14-
Vue can be installed [directly on Windows](./vue-on-windows.md) or on WSL. We generally recommend installing on WSL 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.
14+
Vue can be installed [directly on Windows](./vue-on-windows.md) or on WSL. WSL is recommended if you plan to interact with a Node.js backend, deploy to Linux servers, or follow tutorials that use Bash commands.
1515

1616
## Prerequisites
1717

18-
- [Install Windows Subsystem for Linux (WSL)](/windows/wsl/install-win10), including a Linux distribution (like Ubuntu) and make sure it is running in WSL 2 mode. You can check this by opening PowerShell and entering: `wsl -l -v`
19-
- [Install Node.js on WSL 2](./nodejs-on-wsl.md): This includes a version manager, package manager, Visual Studio Code, and the Remote Development extension. The Node Package Manager (npm) is used to install Vue.js.
18+
- [Install Windows Subsystem for Linux (WSL)](/windows/wsl/install), including a Linux distribution (like Ubuntu) running in WSL 2 mode. Verify with: `wsl -l -v`
19+
- [Install Node.js on WSL 2](./nodejs-on-wsl.md): This includes a version manager, package manager, Visual Studio Code, and the Remote Development extension.
2020

2121
> [!IMPORTANT]
22-
> Installing a Linux distribution with WSL will create a directory for storing files: `\\wsl\Ubuntu-20.04` (substitute Ubuntu-20.04 with whatever Linux distribution you're using). To open this directory in Windows File Explorer, open your WSL command line, select your home directory using `cd ~`, then enter the command `explorer.exe .` Be careful not to install or store files that you will be working with on the mounted C drive (`/mnt/c/Users/yourname$`). Doing so will significantly slow down your install and build times.
22+
> Store your project files inside the WSL filesystem (e.g., `~/projects`), not on the mounted Windows drive (`/mnt/c/`). Working across the filesystem boundary significantly slows down install and build times.
2323
24-
## Install Vue.js
24+
## Create a Vue project
2525

26-
To install Vue.js on WSL:
26+
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:
2727

28-
1. Open a WSL command line (ie. Ubuntu).
28+
1. Open your WSL terminal (e.g., Ubuntu).
2929

30-
2. Create a new project folder: `mkdir VueProjects` and enter that directory: `cd VueProjects`.
30+
2. Navigate to your projects directory:
3131

32-
3. Install Vue.js using Node Package Manager (npm):
32+
```bash
33+
cd ~/projects
34+
```
3335

34-
```bash
35-
npm install vue
36-
```
36+
3. Create a new Vue project:
3737

38-
Check the version number you have installed by using the command: `vue --version`.
38+
```bash
39+
npm create vue@latest
40+
```
3941

40-
> [!NOTE]
41-
> To install Vue.js using a CDN, rather than NPM, see the [Vue.js install docs](https://vuejs.org/v2/guide/installation.html#CDN).
42+
The installer prompts you to name your project and choose optional features (TypeScript, JSX support, Vue Router, Pinia state management, Vitest, ESLint).
4243

43-
## Install Vue CLI
44+
4. Navigate into the project folder, install dependencies, and start the dev server:
4445

45-
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.*
46+
```bash
47+
cd <your-project-name>
48+
npm install
49+
npm run dev
50+
```
4651

47-
To install Vue CLI, use npm. You must use the `-g` flag to globally install in order to upgrade (`vue upgrade --next`):
48-
49-
```bash
50-
npm install -g @vue/cli
51-
```
52-
53-
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.
52+
Your app will be available at `http://localhost:5173`.
5453

5554
## Additional resources
5655

57-
- [Vue docs](https://vuejs.org/)
56+
- [Vue docs](https://vuejs.org/guide/introduction.html)
5857
- [Vue.js overview](./vue-overview.md)
5958
- [Install Vue.js on Windows](./vue-on-windows.md)
60-
- [Install Nuxt.js](./nuxtjs-on-wsl.md)
61-
- Microsoft Learn online course: [Take your first steps with Vue.js](/training/paths/vue-first-steps/)
62-
- Try a [Vue tutorial with VS Code](https://code.visualstudio.com/docs/nodejs/vuejs-tutorial)
59+
- [Take your first steps with Vue.js](/training/paths/vue-first-steps/) learning path
60+
- [Vue tutorial with VS Code](https://code.visualstudio.com/docs/nodejs/vuejs-tutorial)

0 commit comments

Comments
 (0)