node-gitlog icon indicating copy to clipboard operation
node-gitlog copied to clipboard

require() of ES Module node_modules/gitlog/dist/index.js from dist/sdk/git_cli/index.js not supported.

Open batchor opened this issue 6 months ago • 1 comments

I run into this weird error. I'm not familiar with ts but it seems like some import problem with this package because all other packages are working well.

What I have in my sdk/git_cli/index.ts is:

import gitlog, { GitlogOptions } from "gitlog";

tsconfig.ts:

{
    "compilerOptions": {
      "module": "CommonJS",
      "esModuleInterop": true,
      "target": "ES2022",
      "allowJs": true,
      "removeComments": true,
      "lib": [
        "ES2022.String",
        "ES2022"
      ],
      "moduleResolution": "Node",
      "sourceMap": true,
      "skipLibCheck": true,
      "outDir": "dist",
    },
    "exclude": [
        "node_modules",
        "frontend",
        "test",
        "dist"
    ],
}

batchor avatar Aug 03 '24 23:08 batchor