This guide is specifically for Windows users who want to install TypeScript cleanly and verify that the compiler works in PowerShell or Command Prompt. If you want the cross-platform overview first, start with How to Install TypeScript on Windows, macOS and Linux. For the other operating systems, use the guides for macOS and Linux.
Quick Answer
- Download and install Node.js from nodejs.org (includes npm)
- Open Command Prompt or PowerShell and install TypeScript:
npm install -g typescript - Verify:
tsc --version - Compile a TypeScript file:
tsc yourfile.ts
Before You Start
TypeScript is installed through npm, so you need Node.js on your Windows machine first. The two easiest methods are the Node.js installer or winget.
Option 1: Install Node.js with winget
If you already use modern Windows package management, this is usually the fastest approach.
winget install OpenJS.NodeJS.LTS
node -v
npm -vOption 2: Install Node.js with the Official Windows Installer
Download the current LTS release from the official Node.js website, run the installer, and keep the option that adds Node.js to your system PATH enabled. Then open a new PowerShell or Command Prompt window and verify the install:
node -v
npm -vInstall TypeScript Globally
Once Node.js is ready, install TypeScript globally:
npm install -g typescript
tsc -vThis makes the TypeScript compiler available system-wide.
Install TypeScript Per Project
If you want a cleaner project-level setup, create a folder and install TypeScript locally:
mkdir my-typescript-project
cd my-typescript-project
npm init -y
npm install --save-dev typescript
npx tsc --initThis is usually the better option for real applications because every project can pin its own compiler version.
Verify the Compiler in PowerShell
Create a test file and compile it:
Set-Content hello.ts 'const message: string = "TurboGeek";'
tsc hello.ts
Get-ChildItemYou should see a generated hello.js file after compilation.
Troubleshooting on Windows
npmis not recognized: reopen PowerShell or Command Prompt after installing Node.js.tscis not recognized: verify that the global npm bin directory is on your PATH, or usenpx tscinside a project.- Permission issues: open PowerShell as Administrator only if you genuinely need it; for most installs, standard user permissions are enough.
npx tsc -vRelated TypeScript Guides
- TypeScript install hub for all platforms
- How to Install TypeScript on macOS
- How to Install TypeScript on Linux
Once TypeScript is installed on Windows, the next job is setting up a project with tsconfig.json, an editor like Visual Studio Code, and a build or linting workflow that matches your stack.

