The first thing you wanna do is to open up your command line terminal and cd into the directory of your choice. Next, see whether NodeJS is properly installed on your system. If not, download and install it.
In the next step, inside the terminal type in the following command and hit enter :
npx create-next-app
In the next step, you’ll be prompted to give your folder a name, so, give it a name ( like first-project) and hit enter. In the following steps you’ll be prompted again to add some extra features and options. You can just hit ‘yes’ or ‘no’ as per your needs.
After that your NextJS project folder will be created with the default and add-on dependencies you’ve selected.
Finally, you can open up your folder in a code editor and use the below terminal command to see the default site in live server on your local host (details are provided when you type the command):
npm run dev
To cancel running the live server in realtime, just type Ctrl + C inside the terminal. To start again, repeat the steps above.
You can now start building your app or website.