Node.js Installation & Setup
Install Node.js, understand LTS releases, verify your installation, and set up a clean development environment with VS Code and the terminal.
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
node --version
npm --version
# Open the interactive Node REPL
node
- 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.
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.