Get Personalized Learning Experience

Most tutorials treat everyone the same. OpenLume adapts to your skills, pace, and goals.

Access tailored content, assessments, and mock interviews — all in one place.

Back to Software Developer in Test (SDET) (Playwright, TypeScript) 90-day Learning Plan

Install Node.js and npm for TypeScript development

Introduction

Welcome to your first step as a Software Developer in Test (SDET)! In this topic, we'll focus on installing Node.js and npm—essential tools for TypeScript development and for working with Playwright, which you'll use throughout your automation journey. Since you have no prior experience with these technologies, we'll break down each step, explain the purpose behind every action, and set you up for success before you move on to project setup and Playwright installation in the next topics.

What Are Node.js and npm?

Before we dive into installation, let's clarify what these tools are:

  • Node.js is a runtime that lets you run JavaScript (and TypeScript, once compiled) outside of a browser—perfect for automation tools like Playwright.
  • npm stands for "Node Package Manager." It's a tool that helps you install, manage, and update packages (libraries or tools) like Playwright or TypeScript itself.

You’ll need both to create modern test automation projects.

Checking If Node.js and npm Are Already Installed

First, let's check if Node.js and npm are already installed on your system.

Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run:

node -v

If you see something like v18.16.0, Node.js is installed. Next, check npm:

npm -v

If you see a version number (e.g., 9.5.1), npm is installed too. If either command gives an error or says "not found", you’ll need to install them.

How to Install Node.js and npm (Step-by-Step)

Since you're starting from scratch, let’s walk through the standard installation process using the official installer.

1. Download the Installer

Go to the official Node.js website: https://nodejs.org

You'll see two versions:

  • LTS (Long Term Support): Recommended for most users—stable and reliable.
  • Current: Latest features but may not be as stable.

👉 Click the LTS download button for your operating system (Windows, macOS, or Linux).

💡 Pro Tip: Choose the LTS version unless you have a specific reason to use the latest features. Most automation tools—including Playwright—recommend LTS for compatibility.

2. Run the Installer

  • Open the downloaded installer file.
  • Follow the prompts:
    • Accept the license agreement.
    • Choose default settings unless you have specific needs.
    • Complete installation.

This process installs both Node.js and npm together.

Verifying Your Installation

After installation, reopen your terminal and run these commands again:

node -v
npm -v

You should now see version numbers for both. This means you're ready to start creating projects with TypeScript and Playwright!

Troubleshooting Common Installation Issues

If you encounter issues like “command not found” or version numbers not displaying:

  • Restart your computer: Some changes don’t take effect until a reboot.
  • Check your PATH environment variable: The installer should handle this, but if commands aren’t recognized, search how to add Node.js to your PATH for your OS.
  • Reinstall using the official installer: Sometimes installations fail due to permissions or antivirus interference—try running as administrator or disabling antivirus temporarily.

💡 Pro Tip: If you're ever unsure about an error message during installation, copy it exactly and search online with keywords like Node.js install error [your error]. There’s likely a solution already posted!

Get Personalized Learning Experience

Most tutorials treat everyone the same. OpenLume adapts to your skills, pace, and goals.

Access tailored content, assessments, and mock interviews — all in one place.