gzj666-scy / beautiful-soup-js

BeautifulSoup 的js实现
2 stars 0 forks source link

TypeScript Error TS2351: This expression is not constructable. Type 'typeof import has no construct signatures. #1

Open anuran-roy opened 1 year ago

anuran-roy commented 1 year ago

Description

When I am importing BeautifulSoup object, I run into the following error:

Error Image

My current TypeScript configuration

{
    "include": [
        "./src/",
        "./.env",
        "./*.json"
    ],
    "exclude": [
        "node_modules",
        "build"
    ],
    "compilerOptions": {
        "skipLibCheck": true,
        "module": "NodeNext",
        "esModuleInterop": true,
        "target": "ES2020",
        "moduleResolution": "NodeNext",
        "sourceMap": true,
        "outDir": "build"
    },
}

Suggestion

I think a possible fix can be found here

anuran-roy commented 1 year ago

@gzj666-scy Can you please look into this?

gzj666-scy commented 1 year ago

@gzj666-scy Can you please look into this? Fixed, please install the latest version and try again

gzj666-scy commented 1 year ago

风过无痕 @.***

 

------------------ 原始邮件 ------------------ 发件人: "gzj666-scy/beautiful-soup-js" @.>; 发送时间: 2023年10月6日(星期五) 下午3:03 @.>; @.***>; 主题: [gzj666-scy/beautiful-soup-js] TypeScript Error TS2351: This expression is not constructable. Type 'typeof import has no construct signatures. (Issue #1)

"module": "ESNext", "moduleResolution": "Node",

Description

When I am importing BeautifulSoup object, I run into the following error:

My current TypeScript configuration { "include": [ "./src/", "./.env", "./*.json" ], "exclude": [ "node_modules", "build" ], "compilerOptions": { "skipLibCheck": true, "module": "NodeNext", "esModuleInterop": true, "target": "ES2020", "moduleResolution": "NodeNext", "sourceMap": true, "outDir": "build" }, }

Suggestion

I think a possible fix can be found here

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>