Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个报错PUPPETEER_SKIP_DOWNLOAD 的原因? #15

Open
markyun opened this issue Mar 17, 2024 · 2 comments
Open

这个报错PUPPETEER_SKIP_DOWNLOAD 的原因? #15

markyun opened this issue Mar 17, 2024 · 2 comments

Comments

@markyun
Copy link

markyun commented Mar 17, 2024

puppeteer postinstall$ node install.js
│ ERROR: Failed to set up Chromium r1108766! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
│ Error: read ECONNRESET
│ at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
│ errno: -54,
│ code: 'ECONNRESET',
│ syscall: 'read'
│ }

@markyun markyun changed the title 这个报错是为啥? PUPPETEER_SKIP_DOWNLOAD 值已经设置了 这个报错PUPPETEER_SKIP_DOWNLOAD 的原因? Mar 17, 2024
@InspAlgo
Copy link

我今天也遇到了一样的问题,改了两个地方就没问题了

  1. 调整依赖版本"puppeteer": "^21"
  2. 设置环境变量 $env:PUPPETEER_SKIP_DOWNLOAD="false"

@markyun
Copy link
Author

markyun commented Apr 5, 2024

我今天也遇到了一样的问题,改了两个地方就没问题了

  1. 调整依赖版本"puppeteer": "^21"
  2. 设置环境变量 $env:PUPPETEER_SKIP_DOWNLOAD="false"

我也试好了,同时提供一个小tips:

ps: 因为我的知识库文档内容太多,可以在 getAllBooks 函数中,拿到 bookData 数据后,进行判断,只下载需要的 books 知识库。
code:if (object.books[i].id ===48016029) {

通过 https://www.yuque.com/api/mine/book_stacks 接口获取 全部 bookData内容,得到book_id。

通过https://www.yuque.com/api/catalog_nodes?book_id=xxx + id 可以得到当前知识库的全部文章列表 getBookDetail 内容。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants