Closed parparpoundski closed 1 year ago
Your problem is here:
// LN # 2493 - Potentially the call that causes the crash?
var infoTable = new Table({
rows: lineItems.length + 2,
columns: totalCols,
width: 100,
widthUnitType: WidthType.PERCENTAGE,
});
rows
is an array, not a number. I suggest you use TypeScript to get type information:
https://github.com/dolanmiu/docx/blob/5.5.0/src/file/table/table.ts#L22
https://github.com/dolanmiu/docx/blob/5.5.0/src/file/table/table.ts#L45-L47
Also, upgrade docx to a newer version, docx@5
is old and deprecated for the most part.
I'm having an issue with "docx@5.0.0-rc5" after upgrading from NodeJS version 16.17.0 to v18.15.0:
POST /inventoryViewOrderPaging 200 7.604 ms - 33786
When I try using the latest Docx version ("5.5.0" via npm install --save docx), I get the following:
This is the caller function (see the comment '// LN # 2493 - Potentially the call that causes the crash?'):
Can anyone please explain how to resolve this?