Search code examples
gruntjstypescriptnvmtsctypescript1.4

TypeScript compiler failing on a mac


Typescript compilation task works fine on linux machines but on a mac fails with the following not particularly useful error message and what looks like a binary dump.

$ grunt
Running "ts:build" (ts) task
Compiling...
Fast compile will not work when --out is specified. Ignoring fast compilation
Using tsc v1.4.1
������������=��AF���=����

>> Error: tsc return code: 3
Warning: Task "ts:build" failed. Use --force to continue.

Aborted due to warnings.

Im using nvm with node v0.11.4 and rvm with ruby v2.2.0.

Any ideas how to fix this, or even debug?


Solution

  • The problem was with a malfunctioning node installation. I upgraded to node 0.12 which fixed the problem.

    Just to check the problem wasn't node 0.11.4 specific I removed all previous versions of node and reinstalled 0.11.4 and the error no longer occurs.

    I took these steps after removing all node modules, clearing the cache and reinstalling with no luck. I also tried using multiple typescript compiler versions.