Open slim-hmidi opened 2 months ago
Hey @slim-hmidi
Can you try the bellow?
import { generate } from '@pdfme/generator';
import type { Template } from '@pdfme/common'; // <- change this line
import {writeFile} from 'fs/promises';
import path from 'path';
const generateInquiryPdf = async (template: Template, inputs: Record<string, string>[]) => {
const generatedPdf = await generate({ template, inputs })
await writeFile(path.join(__dirname, `inquiry.pdf`), generatedPdf);
}
Describe the bug
I created an express application using Node.js v20, I want to generate a pdf through the data sent to the api. When I run the server I got many typescript errors related to
antd
module.To Reproduce
I created a template and I installed
@pdfme/generator
and@pdfme/common
:Expected behavior
It should generate a pdf.
Your Environment
Your Error Log