How to create a Next.js project.

Shiori Soma
1 min readJul 14, 2021
Photo by sydney Rae on Unsplash

Run the `npx` command in Terminal.

npx create-next-app next_app

If you see the following, you have succeeded

Success! Created next_app at ….

Perform basic operations on the created project.

- Start the development server and run the app.

npm run devrun dev

- Build the app and generate the finished app.

npm run build

- Run the finished app and check it works

npm start

Project structure

- Folders

.next

This folder is created when you run the project, not when you create it. The files of the web app generated from the project are saved in this folder.

node_modules

This folder contains the npm packages required by the project.

pages

Contains the contents of the web pages to be displayed.

public

A list of resources (image files, etc.) to be made public.

--

--

Shiori Soma

I’m a front-end web developer based in Vancouver, studying CICCC, an web and mobile app development course. https://shiory602.github.io/portfolio/