Skip to content

require() of ES Module node_modules/gitlog/dist/index.js from xx.js not supported. #101

Open
@batchor

Description

@batchor

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"
    ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions