Using tsconfig.json for project configuration
If targetting Node.js, make sure your tsconfig.json
file has settings under the compilerOptions
property to set the module type.
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015"
}
}