TS5110

Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'.

Broken Code ❌

{
  "compilerOptions": {
    "module": "CommonJS",
    "moduleResolution": "Node16"
  }
}

Solution:

Set the module option to Node16 to match the moduleResolution setting in your tsconfig.json.

Fixed Code ✔️

{
  "compilerOptions": {
    "module": "Node16",
    "moduleResolution": "Node16"
  }
}