Installation & Setup
Installation & Setup: Step 1 — Install Node.js LTS TypeScript runs on Node.js. Always install the LTS (Long-Term Support) release — it is the most stable version and is what CI/C
Step 1 — Install Node.js LTS
TypeScript runs on Node.js. Always install the LTS (Long-Term Support) release — it is the most stable version and is what CI/CD environments use. Download from https://nodejs.org and choose the 'LTS' button.
Verify Node.js and npm
# Check Node.js version (should be 18.x or 20.x LTS) node --version # Expected: v20.11.0 # Check npm (Node Package Manager) version npm --version # Expected: 10.2.4
Node.js installation check
Type node --version and press Enter
If you see v18.x or v20.x LTS you're ready
If below v16: nvm install 20
Order the Node.js installation check steps:
Read the version number
Also verify with npm --version
node --version shows v14.17.0. Suitable for a TypeScript 5.x project?
No — TypeScript 5.x requires at least Node.js 16.x
Yes — any Node.js version works
Installation steps
- Windows: download the .msi installer from nodejs.org, run it, leave all defaults, tick 'Add to PATH'
- macOS: use Homebrew — `brew install node` — or download the .pkg from nodejs.org
- Linux (Ubuntu/Debian): `curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs`
- Verify both tools are installed by running the commands below