typescript compiler (tsc) command not working with tsconfig

The issue I had was that I wasn't getting any errors but I also wasn't getting any output.

I realised that I had "noEmit": true in my tsconfig.json file.

When I removed that it worked as expected :)


this is the problem:

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.js

uninstall-update-remove-get-rid-off: Visual Studio outdated extensions...

or remove it from the path ...

or rename the folder to confirm the problem ... then nuke it :)

check what happens if you do:

md x
cd x
tsc --init
npm init -y
npm link typescript
echo console.log('it works') > index.ts
tsc -p .
node .

should output

it works

also. I'll need install typescript local to the project if
a module you depend on, depends on it
you need to use a compiler feature in "your" code
you need to use a different version than the installed globally

to init:

tsc --init

to compile

a 'project' (based on tsconfig.json):

tsc -p .

where . means here

to compile 'other' project

tsc -p other/tsconfig.json

More help

Tags:

Typescript

Tsc