Next.js
frontendnextjsGuideBeginner
Creating a Next.js Project (create-next-app)
How to initialize a production Next.js application: create-next-app flags, TypeScript, Tailwind CSS, Turbopack, and dev server execution.
Verified: 2026-09-30
Tested on:nextjs 16.x
Platforms:
web
#nextjs#setup#create-next-app#turbopack#pnpm
Creating a Next.js Project (create-next-app)
The easiest way to start a new Next.js project is using create-next-app.
1. Automated Setup
Run the initialization script in non-interactive mode with standard production flags:
# Using pnpm:
pnpm create next-app@latest my-app \
--typescript \
--tailwind \
--eslint \
--app \
--src-dir \
--import-alias "@/*"2. Project Scripts
Inside package.json, Next.js provides 4 core scripts:
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
}pnpm dev: Starts local development server with instant Turbopack Fast Refresh onhttp://localhost:3000.pnpm build: Analyzes routes, optimizes assets, and compiles an optimized static and server production bundle.pnpm start: Starts the production Node.js standalone server.
Related Topics
Introduction to Next.js App Router
Understanding Next.js: React Server Components, hybrid rendering, static site generation, streaming SSR, and edge architecture.
Next.js App Router Project Structure
Understanding Next.js folder organization: special file conventions (page, layout, loading, error, not-found, route), public assets, and components.