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

Console error exporting PNG/PDF in playground #3115

Closed
doodlewind opened this issue Jun 15, 2023 · 3 comments · Fixed by #3205
Closed

Console error exporting PNG/PDF in playground #3115

doodlewind opened this issue Jun 15, 2023 · 3 comments · Fixed by #3205
Assignees
Labels
mod:import-export Related to file importing and exporting type:bug Something isn't working

Comments

@doodlewind
Copy link
Member

Console error:

index.ts:145 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:5173/node_modules/.vite/deps/html2canvas.js?v=db7c62c1
@doodlewind doodlewind added type:bug Something isn't working mod:import-export Related to file importing and exporting labels Jun 15, 2023
@doodlewind
Copy link
Member Author

Console error after restarting pnpm:

block-hub.ts:556 Uncaught TypeError: Cannot read properties of undefined (reading 'page')
    at new BlockHub (block-hub.ts:556:26)
    at DocumentCloner2.createElementClone (document-cloner.ts:156:28)
    at DocumentCloner2.cloneNode (document-cloner.ts:318:32)
    at DocumentCloner2.appendChildNode (document-cloner.ts:284:40)
    at DocumentCloner2.cloneChildNodes (document-cloner.ts:301:22)
    at DocumentCloner2.cloneNode (document-cloner.ts:340:22)
    at DocumentCloner2.appendChildNode (document-cloner.ts:284:40)
    at DocumentCloner2.cloneChildNodes (document-cloner.ts:301:22)
    at DocumentCloner2.cloneNode (document-cloner.ts:340:22)
    at new DocumentCloner2 (document-cloner.ts:69:37)
BlockHub @ block-hub.ts:556
DocumentCloner2.createElementClone @ document-cloner.ts:156
DocumentCloner2.cloneNode @ document-cloner.ts:318
DocumentCloner2.appendChildNode @ document-cloner.ts:284
DocumentCloner2.cloneChildNodes @ document-cloner.ts:301
DocumentCloner2.cloneNode @ document-cloner.ts:340
DocumentCloner2.appendChildNode @ document-cloner.ts:284
DocumentCloner2.cloneChildNodes @ document-cloner.ts:301
DocumentCloner2.cloneNode @ document-cloner.ts:340
DocumentCloner2 @ document-cloner.ts:69
(anonymous) @ index.ts:90
step @ tslib.es6.js:102
(anonymous) @ tslib.es6.js:83
(anonymous) @ tslib.es6.js:76
__awaiter @ tslib.es6.js:72
renderElement @ index.ts:29
html2canvas @ index.ts:20
transPageToCanvas @ index.ts:94
await in transPageToCanvas (async)
exportPng @ index.ts:136
_exportPng @ debug-menu.ts:288
handleEvent @ lit-html.ts:2010
Show 17 more frames

@doodlewind doodlewind changed the title Unable to export PNG/PDF in playground Console error exporting PNG/PDF in playground Jun 15, 2023
@pdx1204
Copy link

pdx1204 commented Jun 15, 2023

@zuoxiaodong0815
Copy link
Contributor

The BlockHub node isn't important for exporting, so we can skip this element node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod:import-export Related to file importing and exporting type:bug Something isn't working
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants