DEV Community

Yuto
Yuto

Posted on

Setup Next.js

I've learned how to setup Next.js. I put together it for myself in this blog.
(2023/05/29)

・You can move from Docs to Installation on official site of Next.js.

▼ Official site of Next.js

https://nextjs.org/docs/getting-started/installation

・Following Automatic Installaiton, execute the command on your terminal.

# npm
npx create-next-app@latest
Enter fullscreen mode Exit fullscreen mode

・Put your project name following the instruction.

✔ What is your project named? … [Project name]
Enter fullscreen mode Exit fullscreen mode

・Answer the several questions with Yes or No.

✔ Would you like to use TypeScript with this project? … No / Yes
✔ Would you like to use ESLint with this project? … No / Yes
✔ Would you like to use Tailwind CSS with this project? … No / Yes
✔ Would you like to use `src/` directory with this project? … No / Yes
✔ Use App Router (recommended)? … No / Yes
✔ Would you like to customize the default import alias? … No / Yes
Enter fullscreen mode Exit fullscreen mode

※There exists no file of ".next" yet.

・Move to the file that you just made with your terminal and open an editor.

# Move to new project file 
cd [project name]
# Open an editor
code . 
Enter fullscreen mode Exit fullscreen mode

・Once executing DEV mode, .next directory and the local path will be made.

# DEV mode
npm run dev
Enter fullscreen mode Exit fullscreen mode

Top comments (0)