DEV Community

Visali Nedunchezhian
Visali Nedunchezhian

Posted on

Node js installation

1. Download Node.js Installer

  • Visit the official Node.js website: Node.js Download Page
  • Choose the LTS version (recommended for stability).

2. Run the Installer

  • Double-click the .msi file.
  • Accept the license agreement.
  • Use default settings unless you have specific needs.
  • Ensure the box for npm package manager is checked.

3. Install Tools for Native Modules (Optional)

  • If prompted, allow installation of additional tools (like Python and Visual Studio Build Tools).
  • This is useful for packages that require compilation.

4. Finish Installation

  • Click “Finish” once setup is complete.

5. Verify Installation

  • Open Command Prompt or PowerShell.
  • Run:
node -v
npm -v
Enter fullscreen mode Exit fullscreen mode

• You should see version numbers confirming successful installation

How to Create a New React App

Step 1: Open Your Terminal

Use Command Prompt

Step 2: Run the Create React App Command

npx create-react-app my-app
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • npx runs the package without installing it globally.
  • create-react-app sets up everything for you.
  • my-app is your project folder name (you can change it).

Step 3: Navigate into Your Project Folder

cd my-app
Enter fullscreen mode Exit fullscreen mode

Step 4: Start the Development Server

npm start
Enter fullscreen mode Exit fullscreen mode

This will:

Folder Structure Overview


my-app/
├── node_modules/
├── public/
│   └── index.html
├── src/
│   ├── App.css
│   ├── App.js
│   ├── App.test.js
│   ├── index.css
│   ├── index.js
│   └── reportWebVitals.js
├── .gitignore
├── package.json
├── README.md
└── yarn.lock / package-lock.json
Enter fullscreen mode Exit fullscreen mode

Top comments (0)