Back to results for “Set”
Next.js › Next.js Project Setup & Configuration

How do you create a new Next.js project from scratch?

Beginner

Answer

You run the create-next-app command in your terminal, which walks you through a few setup questions like whether you want TypeScript or Tailwind CSS, and then generates a fully working project structure with all the necessary configuration files already in place.
npx create-next-app@latest my-app
cd my-app
npm run dev
Real-world example A developer starting a new personal blog project runs create-next-app, answers a few quick setup questions, and has a working development server running within a couple of minutes.

Common follow-ups: What options does create-next-app ask you to choose during setup?;What is the difference between the App Router and Pages Router options during setup?