Part 01 / Topic 3 of 9
Scaffolding with create-next-app
create-next-app is the official scaffolding tool — it writes a working project for you instead of you assembling config files by hand. This course's harness (section 9) was created with this exact command, run from this repo's root:
$ npx --yes create-next-app@latest harness --ts --app --tailwind --eslint --use-npm --import-alias "@/*" --yes --disable-git
Creating a new Next.js app in .../nextjs-step-by-step/harness.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- next
- react
- react-dom
Installing devDependencies:
- @tailwindcss/turbopack
- @types/node
- @types/react
- @types/react-dom
- eslint
- eslint-config-next
- tailwindcss
- typescript
added 359 packages, and audited 360 packages in 50s
146 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Generating route types...
✓ Types generated successfully
Skipping git initialization.
Success! Created harness at .../nextjs-step-by-step/harness
| Flag | What it does | Why this course passes it |
|---|---|---|
--ts |
TypeScript project | this course teaches TypeScript from Part 1 (see the roadmap's toolchain notes) |
--app |
App Router, not Pages Router | the only router this course teaches (section 1) |
--tailwind |
Adds Tailwind CSS config | create-next-app's own recommended default — this course keeps it on rather than fighting the default |
--eslint |
Adds an ESLint config | also the recommended default; section 7 shows it catching nothing wrong, which is the point |
--use-npm |
Forces npm over pnpm/yarn/bun | matches this repo's other courses |
--import-alias "@/*" |
Sets the @/ path alias |
the documented default; passed explicitly only so the command is self-describing |
--yes |
Skip interactive prompts, use the flags/defaults given | needed for a non-interactive, reproducible scaffold |
--disable-git |
Don't run git init |
this harness lives inside an existing, already-managed folder structure; a real new project of your own should keep git init on |
For your own projects outside this course, drop --disable-git and just run npx create-next-app@latest my-app --yes — the installed package's own docs confirm --yes alone already "enables TypeScript, Tailwind CSS, ESLint, App Router, and Turbopack, with import alias @/*, and includes AGENTS.md," which is this course's whole flag list, spelled out instead of hidden behind one flag.
Versions this install actually resolved
Read from harness/package.json and the matching node_modules/*/package.json files, not assumed:
| Package | Version |
|---|---|
next |
16.4.6 |
react / react-dom |
19.3.0 |
typescript |
5.9.3 |
eslint |
9.39.5 |
eslint-config-next |
16.4.6 |
tailwindcss |
4.3.3 |
This course is pinned to Next.js 16 (verified 16.4.6) until a later content wave re-verifies against a newer major — Next.js's own AGENTS.md (section 9) exists precisely because this version drifts faster than most frameworks.
Done here? The practice set for Part 1 — including the solutions — is on the part page.