html-to-docx icon indicating copy to clipboard operation
html-to-docx copied to clipboard

Uncaught TypeError: Class extends value undefined is not a constructor or null

Open Pariola-droid opened this issue 1 year ago • 3 comments

is there a reason why im getting this error

const htmlContent = editor.blocksToHTMLLossy(editor.document); //gotten from blocknote editor

async function handleDownloadDocx() { const fileBuffer = await HTMLtoDOCX(htmlContent, { table: { row: { cantSplit: true } }, footer: true, pageNumber: true, });

saveAs(fileBuffer, 'blocknote_document.docx');

}

Uncaught TypeError: Class extends value undefined is not a constructor or null at node_modules/html-to-docx/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js (html-to-docx.js?v=acbe9afc:20527:69) at __require2 (chunk-AUZ3RYOM.js?v=acbe9afc:18:50) at node_modules/html-to-docx/node_modules/xmlbuilder2/lib/builder/index.js (html-to-docx.js?v=acbe9afc:21134:30) at __require2 (chunk-AUZ3RYOM.js?v=acbe9afc:18:50) at node_modules/html-to-docx/node_modules/xmlbuilder2/lib/index.js (html-to-docx.js?v=acbe9afc:21147:21) at __require2 (chunk-AUZ3RYOM.js?v=acbe9afc:18:50) at html-to-docx.js?v=acbe9afc:29030:34

Pariola-droid avatar Mar 18 '24 09:03 Pariola-droid

I am also getting this error, it appears to be triggered by just trying to import HTMLtoDOCX into the React view.

micah-spieler avatar Nov 26 '24 21:11 micah-spieler

Same error with React+ts

MattinaYang avatar Dec 04 '24 10:12 MattinaYang

Same error with Svelte 5 and typescript.

a0a7 avatar Jun 05 '25 02:06 a0a7