Skip to content

Starting a New Project

Video Summary

My go-to utility for starting new Next projects is create-next-app (opens in new tab).

This tool is an NPM package produced and maintained by the Next team. This is the official way to bootstrap new Next projects.

You can install it as a global dependency, but I prefer to use the npx utility:

$ npx create-next-app

This utility is built right into NPM. It will automatically download any missing dependencies, and will execute the package.

When you run this code, you might be prompted to install the create-next-app package. Press "Enter" to acknowledge this.

create-next-app will then ask you a bunch of questions, to figure out the configuration for your project. Depending on when you're watching this, the questions might be slightly different.

Here are my answers:

my answers for the npx utility: No to TypeScript, yes to ESLint, No to Tailwind, Yes to “src” directory, Yes to App Router, and No to customized import aliases

Check out the video for my commentary around why I chose these specific answers.

After answering the final question, create-next-app will create all of the files and install the NPM dependencies. You should be all set!

The structure should feel familiar: I've been using this exact tool to create all of the Next projects we've seen so far!

That said, it can be a little overwhelming: there are lots of configuration files, things like .eslintrc, jsconfig.json, and next.config.js. My recommendation is to not worry about them too much. I learned about the configuration options organically, often from having a specific problem and learning on StackOverflow that the solution is to tweak the config file.

You can learn more about create-next-app on NPM (opens in new tab).