PrismarineJS/prismarine-viewer

Recording

SC-HARSH opened this issue · 0 comments

In new prismarine viewer update of Apr 2022. The headless is not working which does not allow to record.
Error-
const canvas = createCanvas(width, height)
^

TypeError: createCanvas is not a function
at module.exports ((filepath)\node_modules\prismarine-viewer\lib\headless.js:18:18)
at Client. ((filepath)\index.js:70:7)
at Client.emit (node:events:520:28)
at (filepath)\node_modules\whatsapp-web.js\src\Client.js:347:18
at Page._onBindingCalled ((filepath)\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:998:62)
at (filepath)\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:152:60
at (filepath)\node_modules\puppeteer\lib\cjs\vendor\mitt\src\index.js:51:62
at Array.map ()
at Object.emit ((filepath)\node_modules\puppeteer\lib\cjs\vendor\mitt\src\index.js:51:43)
at CDPSession.emit ((filepath)\node_modules\puppeteer\lib\cjs\puppeteer\common\EventEmitter.js:72:22)
at CDPSession._onMessage ((filepath)\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:249:18)
at Connection._onMessage ((filepath)\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:117:25)
at WebSocket. ((filepath)\node_modules\puppeteer\lib\cjs\puppeteer\node\NodeWebSocketTransport.js:13:32)
at WebSocket.onMessage ((filepath)\node_modules\ws\lib\event-target.js:199:18)
at WebSocket.emit (node:events:520:28)
at Receiver.receiverOnMessage ((filepath)\node_modules\ws\lib\websocket.js:1137:20)