Getting Started - Installation - Next - Js
Getting Started - Installation - Next - Js
Copy page
Getting Started Installat…
Installation
Create a new [Link] app and run it locally.
Installation
pnpm npm yarn bun
Project Structure
Terminal
Layouts and Pages
Supported browsers
[Link] supports modern browsers with zero
configuration.
- Chrome 111+
- Edge 111+
- Firefox 111+
- Safari 16.4+
Terminal
npx create-next-app@latest
Terminal
Terminal
Terminal
[Link]
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint",
"lint:fix": "eslint --fix"
}
}
app/[Link] TypeScript
app/[Link] TypeScript
Good to know:
- If you forget to create the root layout,
[Link] will automatically create this file
when running the development server with
next dev .
app/[Link] TypeScript
Set up TypeScript
Minimum TypeScript version: v5.1.0
IDE Plugin
[Link] includes a custom TypeScript plugin
and type checker, which VSCode and other
code editors can use for advanced type-
checking and auto-completion.
Set up linting
This site uses tracking technologies. You may opt [Link]
or opt supports linting with either ESLint or
out of the use of these technologies. Biome. Choose a linter and run it directly via
[Link] scripts.
{
"scripts": {
"lint": "eslint",
"lint:fix": "eslint --fix"
}
}
[Link]
{
"scripts": {
"lint": "biome check",
"format": "biome format --write"
}
}
Terminal
// Before
import { Button } from '../../../componen
// After
import { Button } from '@/components/butt
{
"compilerOptions": {
"baseUrl": "src/"
}
}
[Link] or [Link]
{
"compilerOptions": {
"baseUrl": "src/",
"paths": {
"@/styles/*": ["styles/*"],
"@/components/*": ["components/*"]
}
}
}
Previous Next
Getting Started Project Structure
you@[Link] Subscribe