Skip to content

创建实例时候 报错 TypeError: (0 , x_crawl_1.default) is not a function #89

@618457

Description

@618457

Bug 预期

执行爬虫实例化时
const myXCrawl = xCrawl();

报错

TypeError: (0 , x_crawl_1.default) is not a function

最小可重复的例子

import xCrawl from 'x-crawl';

  async crawl(path: string) {
    // 2.创建一个爬虫实例
    const myXCrawl = xCrawl();
    myXCrawl.crawlPage(path).then(res => {
      const { browser, page } = res.data;
      console.log(page);
      // 关闭浏览器
      browser.close();
    });
  }

报错信息

ERROR 389 TypeError: (0 , x_crawl_1.default) is not a function

x-crawl 版本

8.3.1

Node 版本

16.19.1

包管理器

npm

包管理器版本

9.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions