Check out Youtube Video:
https://www.youtube.com/watch?v=gKQ2ghqI2zY
1. Update and Install Dependencies
First, update your system and install curl
if it's not already installed:
sudo apt update && sudo apt upgrade -y
sudo apt install curl -y
2. Install Node.js and npm
Next.js requires Node.js. Install it using Node Version Manager (nvm):
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source ~/.bashrc
Verify Installation
node -v npm -v
3. Create a Next.js App
Use
create-next-app
to set up a new project:npx create-next-app@latest my-next-app
4. Start Development Server
Use
create-next-app
to set up a new project:npm run dev