How to Setup a Nuxt 3 Project: A Beginner's Guide

20th March, 2025 · 10m

Introduction

Nuxt 3 is the latest iteration of the Vue.js framework that simplifies building server-side rendered, static, and single-page applications. This guide covers everything from initial setup to deployment.


Prerequisites

Before starting, ensure you have:

  • Node.js v18 or later
  • A package manager (npm, yarn, or pnpm)
  • Basic knowledge of Vue.js

Project Setup

1. Create a New Project

Run this command in your terminal:

npx nuxi init my-nuxt-app

Replace my-nuxt-app with your desired project name. This command will create a new Nuxt 3 project with default configuration.


2. Navigate to Project Directory

cd my-nuxt-app

3. Start Development Server

npm run dev

Your app will be running at http://localhost:3000

Nuxt Welcome Page


Project Structure

The main directories in your Nuxt 3 project:

my-nuxt-app/
├── .nuxt/          # Build files
├── node_modules/   # Dependencies
├── public/         # Static files
├── app.vue         # Main component
└── nuxt.config.ts  # Configuration

Creating Your First Page

Add a new file at pages/index.vue:

<template>
  <div>
    <h1>Welcome to Nuxt 3</h1>
    <p>Edit this page to get started</p>
  </div>
</template>

Building for Production

Generate optimized production build:

npm run build

Deployment Options

Nuxt 3 applications can be deployed to:


Next Steps

Explore Nuxt 3 modules to extend functionality:


Resources


With your Nuxt 3 project now set up, you're ready to start building powerful Nuxt applications. Happy coding!