Closed wider2 closed 3 weeks ago
Describe the bug Error: export 'praseAsync' (imported as 'docx') was not found in 'docx-preview-sync' (module has no exports) or Error: export 'renderAsync' (imported as 'docx') was not found in 'docx-preview-sync' (module has no exports)
Document I have installed the package "npm i docx-preview-sync", but When trying to compile the Angular project I have got the error.
Source code
import * as docx from 'docx-preview-sync';
docx.renderAsync(download.content, document.getElementById("wordContainer")) .then(x => console.log("docx: finished"));
Sorry,The Readme.md is old version from docx-preview.
Try to use parseSync function instead of parseAsync function. I rewrite Readme.md for this library,it's useful for user.
This library is still in the development stage, so it is not recommended to use it in production.
Describe the bug Error: export 'praseAsync' (imported as 'docx') was not found in 'docx-preview-sync' (module has no exports) or Error: export 'renderAsync' (imported as 'docx') was not found in 'docx-preview-sync' (module has no exports)
Document I have installed the package "npm i docx-preview-sync", but When trying to compile the Angular project I have got the error.
Source code
import * as docx from 'docx-preview-sync';
docx.renderAsync(download.content, document.getElementById("wordContainer")) .then(x => console.log("docx: finished"));