VolodymyrBaydalka / docxjs

Docx rendering library
Apache License 2.0
1.2k stars 154 forks source link

Unable to use this package in React 17 #127

Open mohituplers opened 1 month ago

mohituplers commented 1 month ago

Describe the bug Not able to import anything from "docx-preview", it gives error "This dependency was not found: docx-preview".

I tried to add "main": "./dist/docx-preview.js" line in package.json inside node_module then it gives below error,

Module parse failed: Unexpected token (99:58)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     function hasXmlParserError(doc) {
>         return doc.getElementsByTagName("parsererror")[0]?.textContent;
|     }
|     function removeUTF8BOM(data) {
mohituplers commented 1 month ago

@dmitri-gb @champkeh @fangd1997 @enjineerds @jrclaypool @szabi Can you please help

champkeh commented 1 month ago

can you provide a reproducible projects or code samples?