代码拉取完成,页面将自动刷新
Next.js
官网:https://nextjs.org/docs/getting-started/installation
中文:https://next.nodejs.cn/docs/getting-started/installation
npx create-next-app@latest 通过cli模板创建项目(回车后进入交互命令行)
PS C:\Users\ycwb4646> npx create-next-app@latest
Need to install the following packages:
create-next-app@14.2.14
Ok to proceed? (y)
√ What is your project named? ... next-app
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like to use `src/` directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to customize the default import alias (@/*)? ... No / Yes
Creating a new Next.js app in C:\Users\ycwb4646\next-app.
cd .\next-app\
运行
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
访问:http://localhost:3000/
安装最新依赖:
npm install next@latest react@latest react-dom@latest
运行脚本:package.json
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。