Installation & Setup

Installation & Setup: Terminal — Node.js Installation Flow Step 1: Install Node.js JavaScript runs outside the browser thanks to the Node.js runtime.

Terminal — Node.js Installation Flow

Step 1: Install Node.js

JavaScript runs outside the browser thanks to the Node.js runtime. When you install Node.js on your computer, npm (Node Package Manager) is automatically installed as well. Node.js is basically Chrome's V8 engine packaged to run locally on your system.

Windows (PowerShell / CMD)

# 1. Download Node.js LTS: https://nodejs.org → Windows Installer (.msi) # 2. Open a new terminal after install and verify: node --version # Expected: v22.x.x npm --version # Expected: 10.x.x # 3. Quick test node -e "console.log('Node.js is running!')" # Expected output: Node.js is running! # 4. Create a project folder mkdir my-qa-project && cd my-qa-project npm init -y # Expected: package.json file created

What Does the node --version Output Actually Verify?

Running node --version…

Running node --version makes the terminal FIND node.exe via the PATH environment variable and READ the version baked into it — if the install failed, you get "command not found" instead.

npm --version runs a SEPARATE binary…

npm --version runs a SEPARATE binary (npm.cmd) — npm ships automatically with Node.js, but BOTH must be correctly REGISTERED on PATH.

node -e "console.log(...)"…

node -e "console.log(...)" uses the -e (evaluate) flag to run a single line of JavaScript DIRECTLY without ever writing a file — a QUICK way to test the install without creating a .js file.

The && operator in mkdir ... && cd ...…

The && operator in mkdir my-qa-project && cd my-qa-project runs the SECOND command only if the FIRST succeeds (exit code 0) — if mkdir fails (folder already exists), cd NEVER runs.

Installation steps

  1. node --version — Checks Node.js version. v18+ LTS required. Expected output: v22.4.0
  2. npm --version — Checks npm package manager version. Expected output: 10.8.1
  3. node -e "console.log('JS OK')" — Verifies Node.js is running correctly. Expected output: JS OK
  4. npx playwright --version — Shows Playwright version if installed. Expected output: Version 1.48.0