xxxxxxxxxx
npx create-next-app <app name> //eg: npx create-next-app my-app
cd my-app //to go to the folder
npm run dev // to run the app
xxxxxxxxxx
$ npx create-next-app@latest
# or
$ yarn create next-app
# or
$ pnpm create next-app
xxxxxxxxxx
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
npx create-next-app@latest
yarn create next-app
pnpm create next-app
If you want to start with a TypeScript
project you can use the --typescript flag:
npx create-next-app@latest --typescript
yarn create next-app --typescript
pnpm create next-app --typescript
xxxxxxxxxx
npx create-next-app@latest
cd <project directory>
npx shadcn-ui@latest init
xxxxxxxxxx
npm init next-app nextjs-blog --example "https://github.com/vercel/next-learn-starter/tree/master/learn-starter"
xxxxxxxxxx
{
"extends": ["next", "next/core-web-vitals", "eslint:recommended"],
"globals": {
"React": "readonly"
},
"rules": {
"no-unused-vars": [1, { "args": "after-used", "argsIgnorePattern": "^_" }]
}
}