TypeScript: Install

By Xah Lee. Date: .

Download

Clean Install TypeScript Globally, and Nodejs

i recommend installing TypeScript globally.

The easiest way is intalling it via npm. (npm is part of nodejs.)

once nodejs is installed, you can install TypeScript by

npm install -g typescript

(npm creator Isaac Z Schlueter is very corrupt. I recommend not to use npm. Use Deno: Intro instead. )

get versions

get locations

# find if nodejs is installed and is in path
gcm node

# find if npm is installed and is in path
gcm npm

# gcm is Get-Command

some common paths

c:/Program Files/node
~/.modules
c:/Users/xah/AppData/Roaming/npm
c:/Users/xah/AppData/Roaming/npm/tsc.cmd
c:/Users/xah/AppData/Roaming/npm/node_modules/typescript/bin/tsc
c:/Users/xah/AppData/Roaming/npm/node_modules/typescript/package.json
c:/Users/xah/AppData/Roaming/npm-cache

delete nodejs. in Microsoft Windows system settings, app and features.

once TypeScript is installed, you'll have a command line tool named tsc

you need to add the program path to environment variable path. See Windows Environment Variable Tutorial