How to install next.js

To install Next.js, you need to have Node.js installed on your machine.

Check the node version installed in your machine, to check run node -v in your terminal


The recommended installation of Next.js is to use npx create-next-app@latest command. This will install all the necessary files and set up everything.

  • npx create-next-app@latest

If you want to use typescript, add –typescript after the command.

  • npx create-next-app@latest --typescript

After the installation is complete, cd to your project and run these commands

  • npm install
  • npm run dev

Go to localhost:3000

Problems in installation

Check the version of node installed in your machine. I use the latest version 16.14.0. It is important to use 12.22.0 or higher version

Leave a Comment

Your email address will not be published. Required fields are marked *