79637738

Date: 2025-05-25 14:13:33
Score: 0.5
Natty:
Report link

The reason seems to be the use of ES Modules. By the look of things, when ESM are used, ts-node simply falls back to calling node, which is why you get these warnings. Disabling esm in the ts-node config and changing the type to commonjs in my "package.json" files helped in my case.

However, this isn't ideal. A quick Google search suggests that ES Modules are the future. At the same time, after taking a quick look at ts-node's code, it seems to be deliberately skipping type checks for ES Modules (https://github.com/TypeStrong/ts-node/blob/main/esm/transpile-only.mjs). So, you either get ES Modules, or type checking - but not both. I'm new to TypeScript and node.js, and would really appreciate a better solution.

Reasons:
  • RegEx Blacklisted phrase (1.5): I'm new
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: deej