You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following errors on a javascript script file that I'm trying to run:
Error: Cannot create a string longer than 0x1fffffe8 characters
at ReadStream.emit (events.js:388:22) {
code: 'ERR_STRING_TOO_LONG'
}
Here is the code I'm trying to run:
var fs = require('fs');
var XLSX = require('xlsx');
var parseData = async () => {
var file = fs.createReadStream('./data/data.ods');
function process_RS(stream, cb) {
var buffers = [];
stream.on('data', function (data) {
buffers.push(data);
});
stream.on('end', function () {
var buffer = Buffer.concat(buffers);
var workbook = XLSX.read(buffer, { type: 'buffer' });
/* DO SOMETHING WITH workbook IN THE CALLBACK */
cb(workbook);
});
}
process_RS(file);
};
parseData();
Would really appreciate some help with this, thanks
The text was updated successfully, but these errors were encountered:
I'm getting the following errors on a javascript script file that I'm trying to run:
Here is the code I'm trying to run:
Would really appreciate some help with this, thanks
The text was updated successfully, but these errors were encountered: