vdp_1555367480482_download.txt
const stats = fs.statSync(filePathForVDP);
let writeStream = fs.createWriteStream("final");
// pack.entry({name: 'formats.json'}, formats, function (err) {
// if (err) throw err
// });
//
// pack.entry({name: 'service.json'}, serviceObj, function (err) {
// if (err) throw err
// });
logger.debug(`Stat file size: ${stats.size}`);
let entry = pack.entry({ name: 'vdpTable.vdp', size: stats.size }, function(err) {
// the stream was added
// no more entries
if(err) throw err;
});
let readStream = fs.createReadStream(filePathForVDP);
readStream.pipe(entry);
entry.end();
Error:
'Error: size mismatch\n at Sink. (/opt/app/node_modules/tar-stream/pack.js:175:23)\n at Sink.f (/opt/app/node_modules/once/once.js:25:25)\n at Sink.onfinish (/opt/app/node_modules/end-of-stream/index.js:30:27)\n at Sink.emit (events.js:187:15)\n at Sink.EventEmitter.emit (domain.js:442:20)\n at finishMaybe (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:630:14)\n at endWritable (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:638:3)\n at Sink.Writable.end (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:594:41)\n
vdp_1555367480482_download.txt const stats = fs.statSync(filePathForVDP); let writeStream = fs.createWriteStream("final");
Error:
'Error: size mismatch\n at Sink. (/opt/app/node_modules/tar-stream/pack.js:175:23)\n at Sink.f (/opt/app/node_modules/once/once.js:25:25)\n at Sink.onfinish (/opt/app/node_modules/end-of-stream/index.js:30:27)\n at Sink.emit (events.js:187:15)\n at Sink.EventEmitter.emit (domain.js:442:20)\n at finishMaybe (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:630:14)\n at endWritable (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:638:3)\n at Sink.Writable.end (/opt/app/node_modules/readable-stream/lib/_stream_writable.js:594:41)\n