а почему здесь не работает async await???? const fromSvgToPdf = async (req, res) => {
var doc = new PDFDocument(),
stream = fs.createWriteStream(uploads/${fileName}.pdf
),
svg = req.body.svg;
SVGtoPDF(doc, svg, 0, 0);
console.log('1')
await stream.on('finish', () => {
console.log('2')
});
console.log('3')
doc.pipe(stream);
doc.end();
}