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
• 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
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
Step 4: Start the Development Server
npm start
This will:
- Compile your React app
- Open it in your default browser at http://localhost:3000
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
Top comments (0)