createReport is not a function
See original GitHub issue
`import createReport from “docx-templates”; import fs from “fs”;
const template = fs.readFileSync(“output.docx”);
const create = async () => { const buffer = await createReport({ template, data: { lol: “John”, surname: “Appleseed”, }, }); fs.writeFileSync(“report.docx”, buffer); }; create().then(() => console.log(“done”));`
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
createReport is not a function "docx-templates" lib nodejs
I am trying to use "docx-templates" node library to convert json to word template. I have installed this lib using npm install.
Read more >Cannot populate docx template in node.js · Issue #122 - GitHub
Note that the createReport function returns a promise. In your example you are writing a promise to a file. It seems this is...
Read more >create_report: Create report in DataExplorer - Rdrr.io
This function creates a data profiling report. ... Not run: # Create report create_report(iris) create_report(airquality, y = "Ozone") # Load library ...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >docx-templates - npm
The listCommands function lets you list all the commands in a docx template using the same parser as createReport . import { listCommands...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
if you have
type:modulein your package.json use this wayWith
'type': 'module'inpackage.json, this works-