Author: M Abo Bakar Aslam

Setting Environment for NextJS Environment

Setting up a development environment for NextJS using Visual Studio Code (VS Code) along with essential tools and extensions. Follow the steps below to get started.

1. Install Node.js and npm

Download and install the latest version of Node.js by clicking on below button.

Note: Install Node.js in the C drive.

When you will click on the button, then you can follow steps shown in below figure

Step to Download NodeJS - visualized by edu2skill

2. Install VS Code

Download and Install VS Code latest version by using below button for download. If you have already installed it, then skip this step.

3. Use Existing App - Already Created by Author

You can either create a new app or use an existing one.

4. Steps to Create a New App

4.1. Create a folder on your computer and open it in VS Code.

Important Guidelines:

4.2. Open the terminal in VS Code. Make sure that path of your current folder is shown.

4.3. Ensure your internet connection is active.

4.4. Run the following command:

npx create-next-app@latest

4.4. When you run above command, then it will ask different parameters for your app

4.5. When you run above command, then multiple files will be created in your created folder.

4.6. Run below command with your created-folder. By using this command, you will navigate to your React app's directory using the cd command.

cd yourappname

4.7. If there is no folder named as node_modules in your project, then run below command. Otherwise you can skip this step

npm install

4.8. Run your application by runnin below command. This command you will have to run everytime when you want running the application.

npm run dev