I have a class written in Javascript ES6. When I try to execute nodemon command I always see this error TypeError: Class constructor Client cannot be invo
For those who are using ts-node, it could be possible that your tsconfig.json is unable to be loaded by ts-node.
First make sure you've set the below option for tsconfig.json:
{
"compilerOptions": {
"target": "ES6",
...
}
}
Then you may try ts-node --script-mode or use --project to specify the path to your tsconfig.json.