slidev: can not export to pdf
I try to use npx slidev export to export pdf, but it always fails on:
▲ rendering █████░░░░░░░░░░░░░░░░░░░░░░░░░ 1/6page.goto: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "http://localhost:12445/1?print", waiting until "networkidle"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
Error
at Object.captureStackTrace (/Users/cwh/Mission/coding/slidev/node_modules/playwrigh)
at Connection.sendMessageToServer (/Users/cwh/Mission/coding/slidev/node_modules/pla)
at Proxy.<anonymous> (/Users/cwh/Mission/coding/slidev/node_modules/playwright-chrom)
at /Users/cwh/Mission/coding/slidev/node_modules/playwright-chromium/lib/client/fram5
at Frame._wrapApiCall (/Users/cwh/Mission/coding/slidev/node_modules/playwright-chro)
at Frame.goto (/Users/cwh/Mission/coding/slidev/node_modules/playwright-chromium/lib)
at /Users/cwh/Mission/coding/slidev/node_modules/playwright-chromium/lib/client/page0
at Page._attributeToPage (/Users/cwh/Mission/coding/slidev/node_modules/playwright-c)
at Page.goto (/Users/cwh/Mission/coding/slidev/node_modules/playwright-chromium/lib/)
at go (/Users/cwh/Mission/coding/slidev/node_modules/@slidev/cli/dist/export-WGBEP3O)
at exportSlides (/Users/cwh/Mission/coding/slidev/node_modules/@slidev/cli/dist/expo)
at async Object.handler (/Users/cwh/Mission/coding/slidev/node_modules/@slidev/cli/d{
name: 'TimeoutError'
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 7
- Comments: 33 (10 by maintainers)
Commits related to this issue
- feat: add built-in components doc and add buil-in menu (#116) — committed to slidevjs/slidev by tonai a year ago
You can also try to disable the remote assets downloading
It’s slow to access some foreign resources in some coutries, so a network proxy for low latency is required to meet the timeout limitation.
Add proxy to playwright.
node_modules@slidev\cli\dist\export-LOKLMK66.js 67:
I just turn the monaco editor config to false, and everything works 😃
Only when you use
<Tweet/>in your slides, which in this case, it’s used in the starter template.I don’t know. I don’t think it makes sense to export the slides with some images / content failed to load. But maybe we could improve the error log to show the pending resources that causes the failing.
I already have the remoteAssets: false 😃 … But sometimes it runs into the timeout … so no idea why
Might due to the Twitter scripts (was ‘sync’ loading). Changed to
asyncin v0.16.0, can you guys try the new version out and see if it’s a fix for you? ThanksI have the same error with the default install : • yarn create slidev (don’t run install dependencies & start) • yarn install • yarn export
cf : https://fr.sli.dev/guide/#creation-de-votre-premiere-presentation The default slide content is the same as default slide when we create an new project.
OS : Windows Node : v.14.16.1 Npm : v.6.14.12 Yarn : 1.22.10