Time to bootstrap our project. Follow the steps below:
- First, make sure that you have Node.js and npm installed on your machine. If not, you can download and install them from Node.js official website. This course recommends using Node.js v20.+
node --version
npm --version
- Once Node.js and npm are installed, you can create a new Next.js application by running the following command in your terminal:
npx create-next-app@latest my-app
You can replace 'my-app' with the name of your application.
- Provide the following answers to the questions that appear in the terminal:
? 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
- After the installations have finished, navigate to your new project directory:
cd my-app
- Let’s install some packages that we’re going to need later:
npm i react-icons
- Now, you can start the development server: