So I have a unit test written for mocha using TypeScript. I am trying to run it using gulp (which doesn\'t really play a part here). I get the following exception:
Node doesn't fully support import
yet or at least not by default, so errors will happen when importing using the import in that way.
When using TypeScript you should use "module": "commonjs"
in your compilerOptions
, because that is what node.js uses. When compiled, TypeScript will convert all the imports
to node supported require
's.