Node.js Installation & Setup

๐ŸŸข Node.js LTS ๐Ÿ“— Chapter 3 of 49 ๐Ÿ“‚ Phase 2: Setup & First Program ๐Ÿ—“๏ธ 2026 Edition
๐Ÿ“Œ Covered in this chapter: Installing Node.js ยท LTS Versions ยท node --version ยท npm --version ยท Node REPL ยท VS Code Setup

Install Node.js, understand LTS releases, verify your installation, and set up a clean development environment with VS Code and the terminal.

1Node.js Installation & Setup โ€” What You'll Learn

Install Node.js, understand LTS releases, verify your installation, and set up a clean development environment with VS Code and the terminal.

Here's everything this chapter covers, in the order you'll learn it:

  • Installing Node.js on Windows, macOS and Linux
  • LTS (Long-Term Support) version vs Current version
  • Checking the installed Node version
  • Checking the installed npm version
  • Using the Node REPL for quick experiments
  • Running a JavaScript file with node
  • Creating a project folder
  • Setting up VS Code for Node.js development
  • Basic terminal / command-line usage
  • Common installation errors and fixes
2Working Example
๐Ÿ’ป Example: Node.js Installation & Setup
node --version
npm --version

# Open the interactive Node REPL
node
3Best Practices & Common Pitfalls
๐Ÿ’ก Key things to remember:
  • Always install the LTS (Long-Term Support) version for production projects โ€” it gets security patches for years.
  • On Windows, prefer installing via the official installer or a version manager like nvm-windows.
  • Use nvm (Node Version Manager) if you need to switch between multiple Node.js versions across projects.
โ“ Frequently Asked Questions (FAQ)

Q What's the most important thing to understand about node.js installation & setup?

Focus on: Installing Node.js ยท LTS Versions ยท node --version ยท npm --version ยท Node REPL ยท VS Code Setup. These are the core building blocks this chapter's examples are built around, and they show up repeatedly in later chapters of this course.

Q Do I need external npm packages for node.js installation & setup?

Only where explicitly shown in the code examples above (like Express, Zod, or Socket.IO) โ€” otherwise, this chapter relies entirely on Node.js's own built-in capabilities.

OC
Written by Our Compiler Technical Editorial Team
Reviewed for accuracy & tested on Node.js LTS ยท Last updated August 2026