Setting the length property after construction of Buffer objects is no longer valid.
Reading an excel spreadsheet buffer yields:
TypeError: Cannot set property length of [object Object] which has only a getter
at sbcs_d (.../node/node_modules/xlsx/dist/cpexcel.js:909:20)
at Object.decode (.../node_modules/xlsx/dist/cpexcel.js:1197:40)
at _gc2 (.../node/node_modules/xlsx/xlsx.js:28:24)
at Buffer.ReadShift as read_shift
at parse_XLUnicodeStringNoCch (.../node/node_modules/xlsx/xlsx.js:3113:23)
at parse_XLUnicodeString (.../node/node_modules/xlsx/xlsx.js:3121:9)
at parse_XLUnicodeString2 (.../node/node_modules/xlsx/xlsx.js:3125:48)
at Object.parse_Format as f
at slurp (.../node/node_modules/xlsx/xlsx.js:9229:11)
at parse_workbook (.../node/node_modules/xlsx/xlsx.js:9350:15) +0ms
.../node/node_modules/xlsx/xlsx.js:9350:15)
Just removing the statement at line 909 seems to make everything work again, but not sure how safe this is without fully understanding the context. Hoping someone with more knowledge of this library can provide the right fix.
Setting the length property after construction of Buffer objects is no longer valid.
Reading an excel spreadsheet buffer yields:
TypeError: Cannot set property length of [object Object] which has only a getter at sbcs_d (.../node/node_modules/xlsx/dist/cpexcel.js:909:20) at Object.decode (.../node_modules/xlsx/dist/cpexcel.js:1197:40) at _gc2 (.../node/node_modules/xlsx/xlsx.js:28:24) at Buffer.ReadShift as read_shift at parse_XLUnicodeStringNoCch (.../node/node_modules/xlsx/xlsx.js:3113:23) at parse_XLUnicodeString (.../node/node_modules/xlsx/xlsx.js:3121:9) at parse_XLUnicodeString2 (.../node/node_modules/xlsx/xlsx.js:3125:48) at Object.parse_Format as f at slurp (.../node/node_modules/xlsx/xlsx.js:9229:11) at parse_workbook (.../node/node_modules/xlsx/xlsx.js:9350:15) +0ms .../node/node_modules/xlsx/xlsx.js:9350:15)
Just removing the statement at line 909 seems to make everything work again, but not sure how safe this is without fully understanding the context. Hoping someone with more knowledge of this library can provide the right fix.