What's wrong with my typescript compiler? `tsc --version` returns nothing
In my case on Ubuntu 16.04 the problem was because of I performed sudo apt-get install node-typescript
, which delivered me broken tsc. After removing it via apt-get remove
and then installing as recommended with npm install -g typescript
, it worked fine.
Maybe this will help someone.
I discovered that running node --version
returns nothing (but shouldn't) however nodejs --version
works (the result being v0.10.25
). Reinstalling node didn't fix this. I don't know why this would be the case, as I think I followed the recommended installation procedure.
However, editing file /usr/local/bin/tsc and changing the line:
#!/usr/bin/env node
to
#!/usr/bin/env nodejs
seemed to work. Now tsc --version
returns message TS6029: Version 1.6.2
and I'm getting .js files generated when I run make
.