Skip to content

Install TypeScript

Video Lecture

Install TypeScript Install TypeScript Install TypeScript

Description

Install TypeScript globally

1
npm install -g typescript

Confirm which version is installed

1
tsc -v

Troubleshooting

If you run tsc -v, and are using PowerShell as the VSCode integrated terminal, then you may see the error cannot be loaded because running scripts is disabled on this system.

To fix in VSCode,

File -> Preferences -> Settings and in the search bar write automation.

In the options for Windows, press the edit in settings.json and add this line below to the file as shown in the image below.

1
"terminal.integrated.shellArgs.windows": ["-ExecutionPolicy", "Bypass"],

Add Execution Policy to settings.json

Close the integrated terminal and try again.