How to Set Up a Vue 3 Project with Node.js
Vue.js Tutorials & Resources

How to Set Up a Vue 3 Project with Node.js

Building Your First Vue 3 Application from Scratch

Author
Richard Mendes
March 08, 2025 • 6 mins

Installing Vue.js Project with Command Line (Step-by-Step)

So, you want to install a Vue.js project, right? No worries, I will walk you through it in simple steps.

Open Your Command Prompt

First, you need to open your terminal. It could be PowerShell or Command Prompt, doesn't matter much.

Navigate to Your Folder

Now, go to the folder where you want to create your Vue project. Use the command below:

PS C:\jsapps\news-app-prod> cd..
PS C:\jsapps>

It takes you one step back in your folder structure. You can replace cd.. with your own path if needed.

Create Vue Project

Now, we use npm create to start the project setup. This will download the latest Vue project template for you.

PS C:\jsapps> npm create vue@latest

This is where the magic starts! You'll see something like:

> npx
> create-vue

Vue.js will now ask you a few questions to set up your project. Don’t worry, just answer accordingly.

Questions During Setup

Here’s what you will be asked and what to choose:

1. Project Name:

You will be asked for a project name, for example, news-app-dev — that’s your project’s name.

2. TypeScript?:

If you don’t need TypeScript (it’s optional), just choose No.

3. JSX Support?:

Again, No if you don't need it.

4. Vue Router for SPA?:

Yes, select Yes if you're building a Single Page Application (SPA), otherwise, pick No.

5. Pinia for State Management?:

Yes, if you want easy state management with Pinia.

6. Vitest for Unit Testing?:

If you want unit testing, select Yes. If not, choose No.

7. End-to-End Testing (Cypress)?:

For e2e testing, choose Cypress. If you're unsure, it's always good to have it.

8. ESLint for Code Quality?:

Always a good choice, select Yes for code quality.

9. Prettier for Code Formatting?:

Optional but helpful. Choose Yes if you want auto-formatting.


After Setup

Once the setup is done, you’ll see something like:

Scaffolding project in C:\jsapps\news-app-dev...
Done. Now run:
cd news-app-dev
npm install
npm run format
npm run dev

Now, let’s go ahead and do what Vue tells us.

Go to your project directory

PS C:\jsapps> cd news-app-dev

Install all dependencies

Run this command to install all the necessary packages:

PS C:\jsapps\news-app-dev> npm install

You might see something like this:

> news-app-dev@0.0.0 prepare
> cypress install

Cypress will be installed for end-to-end testing.

Run Your Project

After the installation, run the development server:

npm run dev

You’ll see:

VITE v6.2.1 ready in 890 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ Vue DevTools: Open http://localhost:5173/__devtools__/ as a separate window
➜ Vue DevTools: Press Alt(⌥)+Shift(⇧)+D in App to toggle the Vue DevTools
➜ press h + enter to show help

And that’s it! Your Vue 3 project is now running locally. Go ahead, open http://localhost:5173/ in your browser and see your app in action.

Latest Articles